Skip to content

Fix streamed Codex command output - #906

Open
bartbunting wants to merge 1 commit into
xenodium:mainfrom
bartbunting:fix/codex-streamed-command-output
Open

bartbunting wants to merge 1 commit into
xenodium:mainfrom
bartbunting:fix/codex-streamed-command-output

Conversation

@bartbunting

@bartbunting bartbunting commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex can send command output through _meta.terminal_output_delta.data. Agent Shell currently reads content blocks and rawOutput.formatted_output, so command blocks show the command without its output.

This change accumulates output chunks per tool call and uses the retained output for rendering and transcripts. Status-only updates preserve that output, while complete content or raw-output snapshots replace it. Existing end-of-turn cleanup releases the accumulated state.

Tests cover interleaved commands, output delivered at completion, snapshot replacement, expansion and navigation, restored history, and cleanup.

Validation:
• Tests pass against source and with compiled code.
• No new warnings appear after checkdoc and byte compilation.
• Indentation and whitespace checks pass.
• Tested with Emacs 31.0.90.

Checklist

  • I agree to communicate (PR description and comments) with the author myself (not AI-generated).
  • I've reviewed all code in PR myself and will vouch for its quality.
  • I've read and followed the Contributing guidelines.
  • I've filed a feature request/discussion for a new feature.
  • I'm making visual changes, so I'm including screenshots so you can view and discuss.
  • I've added tests where applicable.
  • I've updated documentation where necessary.
  • I've run M-x checkdoc and M-x byte-compile-file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant