Repository navigation
[NO-JIRA] Add kind and message to session/prompt turn_failed error data (R15) - #24
Merged
Merged
Conversation
…message (R15)
Upstream fails a failed turn's session/prompt with -32603 (or -32000 for auth)
and data {reason: "turn_failed"}. Clients that branch on the cause need a kind:
stall-watch's circuit breaker treats authentication as a provider outage, and
honk records the kind in its turn log. The data becomes
{reason, kind, message}, message capped at 2048 bytes.
The kind is read back from the stored error message (the only thing the server
has once the turn ends): its MessageErrorKind first, then the text written by
the provider-error, retry and compaction paths. Kinds: authentication,
compaction, context_length, max_turns, network, provider, refusal,
retry_exhausted. This replaces fork patch 15 (_meta.goose.turnError on a
successful response), which upstream's error contract made obsolete.
…safe cut, integration tests in CI (R15)
johnnymo87
force-pushed
the
r15-turn-error-kind
branch
from
November 22, 2026 05:17
61d2a89 to
722cf01
Compare
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
Port of fork patch 15 onto v1.60.2 (R15, bead workstation-6w7i.26.4.5).
session/promptwith -32603 (auth: -32000) anddata: {reason: "turn_failed"}. This addskindandmessage(capped at 2048 bytes) to that data, so it becomes{reason, kind, message}.authentication,compaction,context_length,credits_exhausted,max_turns,network,provider,refusal,resource_exhausted,retry_exhausted. The kind is read from the stored error message: itsMessageErrorKindfirst, then the text the provider-error, retry and compaction paths write (prefix constants shared with those producers)._meta.goose.turnErroron a successful response. Consumers already read the new shape: honkd (honk#47) and stall-watch (eng-agent-platform#460).crates/goose/src/acp/turn_error.rs; upstream files get registration lines and two exported prefix checks.acp_server_testend-to-end assertions, all added topatched-test.yml.Behaviour to know: upstream now fails the prompt when max turns is reached (the max-turns message carries
ResourceExhausted), so a prompt bounded bymaxTurnsends withkind: "max_turns"rather than success.References