Report a command's own output, never the rawOutput envelope - #2234
Closed
SawyerHood wants to merge 1 commit into
Closed
Report a command's own output, never the rawOutput envelope#2234SawyerHood wants to merge 1 commit into
SawyerHood wants to merge 1 commit into
Conversation
Live QA on a real Cursor thread and a real grok thread found two places
where a command row showed the agent's rawOutput envelope rendered as JSON
instead of what the command printed.
A command that printed nothing: Cursor reports {exitCode: 3, stdout: "",
stderr: ""}, the empty stdout/stderr join fell through to the generic
fallback, and the row read {"exitCode":3,"stdout":"","stderr":""}. An agent
that reported its streams has said what the command printed, even when that
is nothing, so the row now shows nothing.
A running command's streamed output: grok sends its whole envelope on the
in-progress update, and the row streamed {"type":"Bash","output":[],
"exit_code":0,...} — including an exit code the command had not reached.
The snapshot now comes from the same extraction the close uses.
Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Aug 21, 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.
Stacked on #2231.
What was wrong
Live QA on this stack — a real Cursor thread and a real grok thread in a dev app — found two places where a command row showed the agent's
rawOutputenvelope, rendered as JSON, instead of what the command printed.1. A command that printed nothing. Cursor answers
node -e "process.exit(3)"with{"exitCode":3,"stdout":"","stderr":""}. #2211 joined the streams, got an empty string, treated that as "no output", and fell through to the generic fallback that rendersrawOutputas text. The row read:2. A running command's streamed output. grok sends its whole envelope on the
in_progressupdate. #2211's snapshot used the generic output extraction, so the row streamed:— including
exit_code: 0, an exit code the command had not reached yet (it ended 3).What changed
extractAcpCommandResultnow distinguishes "the agent reported empty output" from "the agent reported no output": the first gives the row noaggregatedOutputat all, the second still falls back to the renderedrawOutput(which is all bb has for an agent that reports output only that way).How I verified
output_for_promptstreams exactly"working\n").test --filter=@bb/provider-bridge-acp: 16 files, 235 tests.pnpm --filter @bb/provider-parity rerecord --provider acp-cursorthentest --filter=@bb/provider-parity --force: 43/43. The rerecord shows the fix on the committed recordings too — four command closes inapproval-allowandsteerlose the bogusaggregatedOutput: "{\"exitCode\":0,…}"and keep their realexitCode.The live QA this came from
Cursor thread
thr_rk5tu74s2c— the two rows the spec asks for:grok thread
thr_pxipc8rbbe:Both
acp-cursorandacp-groklist withfork: falsein that instance, which is what #2229/#2231 declare and what the agents answer.