Repository navigation
Keep a Run's classification across later errors - #708
Merged
Merged
Conversation
On hosted Claude Sessions the bridge sends its classified error and then reports the Turn settlement as unconfirmed; the daemon forwards that as a second error frame, "executor Turn settlement failed", without a code, and Core overwrote the stored engine_error_code with every error frame. Every Claude failure therefore reached diagnostics as harness_error. A frame without an accepted code now leaves the stored classification in place; a later accepted code still replaces it. The Core–Runtime protocol states the rule.
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.
Found while verifying #704 on mx: claude_sdk Turns against an unresolvable model host failed at the right time but diagnostics said
harness_error. The bridge classifiedconnection_failedcorrectly (checked inside a generation-3 sandbox), then:packages/claude-sdk-adapter/src/adapter.ts),claudesdk/executor_turn.go),errorframe, "executor Turn settlement failed", without a code (dispatch/prepared_handoff.go),Result.mergeObservationreplacedengine_error_codeon everyerrorframe, so the second frame erased it.All three stored claude outcomes on mx were
{"error":"executor Turn settlement failed","error_code":"engine_failed"}with noengine_error_code, so every hosted Claude failure (authentication, rate limits, …) reached diagnostics unclassified.A frame without an accepted code now leaves the stored classification in place; a later accepted code still replaces it.
docs/runtime-protocol.md(and zh) states the rule. Harness-neutral, one place, used by both live delivery and terminal journal draining.Checks:
go test ./internal/execution/(whole package),go vet; translation coverage and freshness.Need help on this PR? Tag
@codesmith-botwith what you need.