Repository navigation
fix(#1311): drivers join agent text on line boundaries, so exec's ## Summary reaches the PR body - #1340
Merged
Conversation
…xec's ## Summary reaches the PR body ClaudeCodeDriver, CodexStreamParser and OpencodeStreamParser joined the agent's text messages with "", so a message ending mid-line glued onto exec's final ## Summary and extractExecSummary's line-anchored heading never matched (4 of 4 runs on 2026-10-05 got the placeholder body). A shared appendAgentText/joinAgentTexts inserts a newline only where one is missing. The placeholder warning now prints in parallel mode (every MCP run, where the per-issue log is a no-op) and names the exec output's length. Claude-Session: https://claude.ai/code/session_01B4TQvM2Ps5mc4jFgHB99bw Entire-Checkpoint: c20e814fca93
This was referenced Oct 6, 2026
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.
Summary
Exec's
## Summaryreaches thesequant runPR body again. The Claude Code driver, and the Codex and opencode stream parsers, joined the agent's text messages with"". A message ending mid-line glued onto exec's final summary, soextractExecSummary's line-anchored heading never matched. All four runs on 2026-10-05 (PRs #1317–#1320) opened with the placeholder body.capturedOutput += textContentinclaude-code.ts. Reproduced on the #1309 run:"Now the edits." + "## Summary…"givesnullfrom the extractor, and joining with"\n"gives 2,446 chars.drivers/agent-text.ts:appendAgentText/joinAgentTextsinsert a newline only where one is missing. Used byClaudeCodeDriver(across messages, and across text blocks within one),CodexStreamParserandOpencodeStreamParser. Aider streams raw stdout, so it's unaffected. Fixture tests:agent-text.test.ts(the #1309 run's two messages, plus codex and opencode streams) and aclaude-code.test.tsdriver case.PR body for #N: exec output (K chars) has no Summary or mutation markers; using placeholder. It is printed withconsole.log, likecreatePR's own warnings, because the per-issuelogis a no-op in parallel mode, which is every MCP run. That is why #1297's warning never appeared on any of today's runs. Test:batch-executor.test.ts, parallel case. Interpretation: "run log" is read as the run's output (whatsequant_runreturns inrawOutput), not the JSON run-log file, which has no free-text field.Verification:
/verifyreplayed the four real exec transcripts from today. The old join loses the summary in all four (the placeholder); the fixed join recovers 2,446 / 2,562 / 4,000 (the existing cap) / 2,876 chars. Human-confirmed, evidence on #1311.Mutation-verified: AC-2 — made appendAgentText never insert a newline; agent-text.test.ts (4 cases) and the claude-code.test.ts #1311 case failed, the no-op-join cases passed; restored.
Mutation-verified: AC-3 — routed the placeholder warning back through the parallel-muted log; only the #1311 AC-3 parallel case failed; restored.
Checks:
tsc --noEmitand eslint pass. The targeted vitest run (drivers/,batch-executor.test.ts) passes: 17 files, 436 tests. I didn't run the full suite locally; CI runs it.Not run through
sequant run: a run would have hit this bug while fixing it. Made directly on a branch.Fixes #1311
🤖 Generated with Claude Code