Repository navigation
Conversation
Long Claude replies were lost even when the agent answered correctly: the terminal collector drops replies that scroll out of the pane or outlast timeoutSeconds, and the transcript fallback went through the public search path, which clips each message to 4096 characters. - New `agent-session.sh --agent claude result` reads the whole correlated reply from the native transcript, optionally waiting for it. - The provider uses it after result_uncorrelated or result_timeout, waiting up to agentSessions.resultRecoverySeconds (0-14400, default 0). - agent-native-call.mjs and the new reader write stdout synchronously: process.exit() after an async write cut piped results at 8 KiB. - The bridge forces a UTF-8 locale so prompt and trust-dialog matching work when the host runs with LANG=C. - Fresh sessions: kill the new target when writer ownership can't be proven. - A forked resume no longer counts as a writer of its source session.
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.
Long Claude replies were being lost over MCP even though the agent answered correctly with the right result markers. Short tasks worked, but every review-sized fresh task failed with
result_uncorrelatedorresult_timeout.Two causes:
timeoutSecondswhile a long turn is still running;Changes
agent-session.sh --agent claude result <session> --correlation-id <id> [--wait <s>](claude-transcript-result.mjs) returns the whole reply from the native transcript. It accepts only one assistant text block with exactly one marker pair; duplicates or an unterminated pair give exit 67, nothing found gives 124.result_uncorrelatedorresult_timeoutthe provider calls that reader and waits up toagentSessions.resultRecoverySeconds(0 to 14400, default 0 = check once). The task staysworkingwhile it waits. The search-based fallback is gone.agent-native-call.mjswrote the result and calledprocess.exit()right away, which cuts piped stdout at 8 KiB, so large native-session results came back truncated but marked completed. Both scripts now write synchronously. A new test with a 200 KB result fails on the old code.LANG=C(how the gateway service runs today) tmux and grep mangle the❯/·glyphs used by readiness and trust-dialog matching._mesh-tmux.shnow switches toC.UTF-8when the locale isn't UTF-8. This was also whylaunch-options-test.shfailed locally but not in CI.--resume A --fork-sessionno longer counts as a writer of A. Added a test forfresh_session_unsupportedraised at execution time.Tests
npm run verifypasses on aLANG=Chost, including the full tmux-bridge harness (75/75) and the gateway suite (254/254).Rollout note
To make long reviews complete, the live config needs
resultRecoverySeconds(e.g. 3600) after deploy. With the default of 0, only replies already in the transcript are recovered.