Skip to content

fix: refuse attachments models reject, report abandoned approvals, return typed caller errors - #552

Merged
yarolegovich merged 3 commits into
mainfrom
yarolegovich/fix-549-551
Nov 6, 2026
Merged

yarolegovich merged 3 commits into
mainfrom
yarolegovich/fix-549-551

Conversation

@yarolegovich

@yarolegovich yarolegovich commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Fixes #549, fixes #550, fixes #551.

  • a2aacp embeds only text-like files (as text) and PDFs as resources, and sends images and audio only when the agent advertises them, so that a type the model rejects can't break every later turn of the session. Other files fail the task before the prompt is sent, and untyped files that are UTF-8 text are embedded as text/plain.
  • Added a2aacp.Config.Abandoned, called with the ending event when the turn of a task waiting in input-required ends without the caller (agent exit, question timeout, shutdown). The executor can't emit events outside a request, so the host stores the event, e.g. in its task store.
  • An execution or cancelation in progress is reported as UnsupportedOperation (was INTERNAL_ERROR).
  • Added a2asrv.NewErrorSanitizer, an opt-in call interceptor which logs every request error in full and sends clients the a2a.Error in the chain without its wrapping, the non-internal A2A or context error the chain wraps (e.g. task not found), or internal error.
  • Cluster mode reports a message to a terminal task as UnsupportedOperation like local mode, not InvalidParams.

Two error codes change on the wire, and a2aacp now refuses files it embedded before (e.g. zip, video, or images without the image capability); hosts that need other types can rewrite parts in Config.Prompt. Will mention both in the release notes.

Tested end to end with a2a-serve (main, with a 15-line Config.Abandoned that appends the event to its task store), opencode and google/gemini-3-flash-preview: a binary attachment fails only its own turn and the conversation continues across a restart; text, JSON and PDF attachments are answered correctly; killing opencode acp while a task waits for approval fails the task within a second (acp agent error: acp agent exited), and the late answer gets the terminal-state error; concurrent answers get UNSUPPORTED_OPERATION.

…turn typed caller errors

Fixes #549, #550, #551.

a2aacp embeds only text-like and PDF files as resources, so that a type the
model rejects can't break every later turn of the session. Config.Abandoned
reports tasks whose turn ended while they waited for an answer, since the
executor can't emit their failure. Caller mistakes return typed A2A errors with
short messages, and transports send the message of the a2a.Error in the chain.
Transports kept wire messages as they were, so the full error chain no
longer depends on transport code and is logged before it is trimmed.
WithVerboseErrors and A2A_VERBOSE_ERRORS keep sending whole chains.
…nitizer

Hosts that don't want internal error chains on the wire attach
NewErrorSanitizer, which logs each error in full, so error construction
and transport mapping stay as they were.
@yarolegovich
yarolegovich merged commit ece71bc into main Nov 6, 2026
6 checks passed
@yarolegovich
yarolegovich deleted the yarolegovich/fix-549-551 branch November 6, 2026 13:06
yarolegovich added a commit to a2aproject/a2a-serve that referenced this pull request Nov 6, 2026
* Added the `a2aacp.Config.Abandoned` hook (a2aproject/a2a-go#552) so
that a task waiting for an approval fails when the agent exits, the
question times out in a2aacp or the executor shuts down. Before, the
task stayed input-required for good, and a later answer failed with "the
question is no longer pending".
* The server stores the event, closes the task's open questions, drops
the context from the unattended set when the task ended, and publishes
the event to chat followers, as it does for events of a running
execution. A reply that ended the task first wins; the store refuses
tasks in a terminal state.
* The hook skips tasks while the server stops, so that the next start
still fails them as restarted.
* Updated github.com/a2aproject/a2a-go/v2 to ece71bc, the merge commit
of a2aproject/a2a-go#552.

The event skips the executor wrappers: the stall guard and tool notes
only track running executions, and `modelKeyHint` explains model errors,
which an exited agent doesn't report. No push sender is configured, so
nothing else hears about it.

Fixes #204
yarolegovich added a commit that referenced this pull request Nov 6, 2026
🤖 I have created a release *beep* *boop*
---


## [2.8.0](v2.7.0...v2.8.0)
(2026-11-06)


### Features

* **a2aacp:** add an A2A agent executor for Agent Client Protocol (ACP)
agents ([#491](#491),
[#492](#492),
[#493](#493),
[#494](#494),
[#530](#530),
[#545](#545),
[#548](#548),
[#552](#552),
[#562](#562))
* **a2agrpc:** add GRPCConnectionPool for gRPC client connection reuse
(fixes [#109](#109))
([#382](#382))
([a2411f7](a2411f7))
* **a2asrv:** add NewErrorSanitizer, an opt-in interceptor which logs
request errors in full and sends clients only A2A errors
([#552](#552))
([ece71bc](ece71bc))
* **a2asrv:** agent card HTTP caching (ETag/304, opt-in Cache-Control)
([#496](#496))
([313efd9](313efd9))
* implement structured input extension
([#490](#490))
([367f987](367f987))


### Bug Fixes

* **a2aclient:** honor API key security scheme Location
([#497](#497))
([c59beb5](c59beb5))
* **a2aclient:** honor configured HTTP authentication schemes
([#502](#502))
([413de0c](413de0c))
* **a2aclient:** normalize service param keys set by the client and
AuthInterceptor
([#479](#479))
([96f4df0](96f4df0))
* **a2aclient:** return JSON-RPC errors from non-200 responses
([#559](#559))
([97f1fac](97f1fac))
* **a2acrypto:** reject malformed Unicode before signing
([#450](#450))
([ec6cb14](ec6cb14))
* **a2aevent:** preserve input-required history order
([#501](#501))
([72f94a3](72f94a3))
* **a2aevent:** recover the whole artifact when it changes in place
([#485](#485))
([4d61739](4d61739))
* **a2a:** round-trip null data and nil raw parts through JSON
([#513](#513))
([186decc](186decc))
* **a2asrv:** make ServiceParams.With nil-safe
([#544](#544))
([c6042b8](c6042b8))
* **a2asrv:** preserve escaped tenant REST paths
([#514](#514),
[#562](#562))
([f86cf6c](f86cf6c))
* **a2asrv:** preserve numeric precision in raw card ETags
([#546](#546))
([18c2e72](18c2e72))
* **a2asrv:** reject HEAD before creating task subscriptions
([#481](#481))
([e641e3c](e641e3c))
* **a2asrv:** split comma-separated A2A-Extensions values
([#519](#519))
([db83820](db83820)),
closes [#516](#516)
* **a2av0:** keep security schemes and v0.3 interface in extended agent
cards ([#558](#558))
([196d4bb](196d4bb)),
closes [#556](#556)
* **client:** accept cached status and artifact stream events
([#508](#508))
([ea78132](ea78132))
* **client:** honor streaming interceptor error recovery
([#507](#507))
([737b626](737b626))
* **client:** keep propagated tenants local to each call
([#495](#495))
([0eaf017](0eaf017))
* **client:** preserve escaped REST path segments
([#488](#488))
([8880d8f](8880d8f))
* compare and send A2A-Version as Major.Minor
([#555](#555))
([b5ea753](b5ea753))
* don't fail CancelTask when the canceled execution ends first
([#521](#521))
([1613ae6](1613ae6)),
closes [#518](#518)
* don't move a task to FAILED when cancelation retries run out
([#522](#522))
([247933b](247933b))
* **jsonrpc:** return empty result for successful push config deletion
([#525](#525))
([42d0738](42d0738))
* pass CancelTask metadata over REST
([#520](#520))
([a104b2e](a104b2e)),
closes [#517](#517)
* **pbconv:** preserve JSON data part values
([#503](#503))
([7c040e0](7c040e0))
* **pbconv:** send pkceRequired for authorization code flows
([#542](#542))
([cb2c30b](cb2c30b))
* **push:** cap push notification configs per task
([#405](#405))
([6bb5a68](6bb5a68))
* report executions or cancelations in progress, and messages to
terminal tasks in cluster mode, as UnsupportedOperation
([#552](#552))
([ece71bc](ece71bc))
* **sse:** ignore a leading UTF-8 byte order mark
([#511](#511))
([248f628](248f628))
* **taskexec:** keep the error when broadcasting an event fails
([#536](#536))
([636fa9f](636fa9f))
* **taskexec:** report canceler panics during concurrent cancelation
([#535](#535))
([7ffc680](7ffc680))
* **taskexec:** skip heartbeats for non-positive intervals
([#543](#543))
([c4158ae](c4158ae))
* **taskexec:** wait for the cancelation result of input-required tasks
([#560](#560))
([3194abe](3194abe))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: Yaroslav Shevchuk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant