fix: prevent silent deferral of oversized inbox turns - #21
Merged
Merged
Conversation
apresmoi
marked this pull request as ready for review
September 12, 2026 14:58
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.
A durable delivery can fit admission limits but exceed the execution host's 4,096-codepoint limit after the inbox wrapper is added. Those rejected turns previously stayed deferred without an actionable failure signal.
The dispatcher now checks the complete generated prompt and directs agents to the existing inbox tool when the payload is larger, preserving every delivery. Rejected and failed executions retain a bounded, credential-redacted diagnostic that appears in availability after idle, restart, and unrelated successful work. Explicit disposition or a successful retry clears the affected delivery's diagnostic. Retry remains externally triggered.
Validation includes real-host/parser/store regressions for long scheduled deliveries, six-message batches, Unicode, durable failure visibility, and recovery. Removing either fix makes its corresponding regression tests fail. Additional tests and mutation checks cover empty/large diagnostics, re-sanitization, older agent identities, and the public activity type. The final local suite passed 629 tests with four platform-dependent skips; typecheck, both builds, manifest, native-artifact and production-closure verification passed. Independent Claude Fable 5.1 review passed, including the review fixes and final public-type cleanup. Linux CI is required before merge.
Public schemas are unchanged. Stored receipts gain an optional private
execution_errorfield; older runtimes cannot read records carrying it. This change does not deploy or restart any running organization.