docs(runtime): show deduplicating trigger redeliveries by delivery ID - #2274
Open
devansh173 wants to merge 4 commits into
Open
devansh173 wants to merge 4 commits into
devansh173 wants to merge 4 commits into
Conversation
A redelivered Pub/Sub or Eventarc event runs the agent again in a new session, so a tool's side effect from an earlier attempt happens again. Explain when redelivery happens and how to limit it on current releases: an ack deadline above the longest run with a matching Cloud Run request timeout, a dead-letter topic with the Pub/Sub service agent's roles, the same settings on an Eventarc trigger's subscription, and idempotent tools that deduplicate outside session state. Related: google/adk-python#7322
devansh173
force-pushed
the
docs/trigger-redelivery-side-effects
branch
from
September 28, 2026 11:52
885decf to
b517386
Compare
The dead-letter update, the two add-iam-policy-binding commands and the Eventarc trigger lookup lost their trailing backslashes, so each rendered as one long line with runs of spaces. Split them back across lines like the other multi-line commands on the page.
Python trigger endpoints store the delivery's identity in session state under trigger_delivery. Document its fields and show a tool that builds a provider idempotency key from the subscription or event source and the id, which stays the same across redeliveries. Related: google/adk-python#7322
devansh173
force-pushed
the
docs/trigger-redelivery-side-effects
branch
from
September 28, 2026 12:28
b517386 to
0ac06c9
Compare
…ivery example Check, act and record against a store still pays twice after an ambiguous failure or an overlapping redelivery. Say to prefer the provider's idempotency key, as the example does; otherwise reserve the key atomically before the effect and plan for reconciling an ambiguous attempt. Let a key-in-use error propagate so the message is nacked.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Documents the
trigger_deliverysession state key that google/adk-python#7325 adds to the Pub/Sub and Eventarc trigger endpoints, so tools can deduplicate redelivered events.This PR builds on #2275, which adds the Redeliveries and side effects section (ack deadline, Cloud Run timeout, dead-letter topic, Eventarc) for current releases. Until #2275 merges, this PR's diff includes its commits too. The change specific to this PR is the last commit, which adds a Deduplicate with the delivery ID subsection to that section:
trigger_deliveryfields (source,id, andsubscription/publish_timefor Pub/Sub orevent_source/typefor Eventarc).idalone is not enough: it is unique only within its topic or event source, so the key includessubscriptionorevent_source.Related
trigger_delivery: fix(cli): expose trigger delivery id so tools can detect redeliveries adk-python#7325Merge timing: google/adk-python#7325 is not released yet, so please hold merging until it ships. I'll add the "Supported in ADK" version for this subsection then, and rebase onto
mainonce #2275 is in.Testing
mkdocs build --strictpasses locally with no warnings.trigger_deliveryfields and the example's key format match the implementation and tests in fix(cli): expose trigger delivery id so tools can detect redeliveries adk-python#7325. The same pattern was checked end to end there with the reproduction script from Pub/Sub trigger: a redelivered message re-runs the agent in a new session, repeating tool side effects that already happened adk-python#7322: one charge across a500→200redelivery, and a newmessageIdis still charged.