feat(process): add StreamMode for real-time stdout tee to stderr#66
Merged
RyderFreeman4Logos merged 1 commit intomainfrom Feb 13, 2026
Merged
feat(process): add StreamMode for real-time stdout tee to stderr#66RyderFreeman4Logos merged 1 commit intomainfrom
RyderFreeman4Logos merged 1 commit intomainfrom
Conversation
[MOTIVATION] When CSA spawns long-running tools like codex, callers cannot distinguish between "tool is thinking" and "tool is hung" because stdout is fully buffered. Adding a TeeToStderr mode forwards stdout lines to stderr with a [stdout] prefix, providing real-time visibility into child process activity. [IMPLEMENTATION DETAILS] - Add StreamMode enum (BufferOnly/TeeToStderr) to csa-process - Thread StreamMode through wait_and_capture, run_and_capture_with_stdin, Executor::execute/execute_in, and pipeline::execute_with_session - Auto-detect: text format + stderr is TTY → TeeToStderr - Add --stream-stdout CLI flag for explicit override - Default BufferOnly preserves backward compat for JSON/pipe/CI - 8 new tests for StreamMode behavior Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Owner
Author
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
StreamModeenum (BufferOnly/TeeToStderr) tocsa-processfor real-time stdout forwardingStreamModethrough the entire execution chain:wait_and_capture→run_and_capture_with_stdin→Executor::execute/execute_in→pipeline::execute_with_sessionTeeToStderr--stream-stdoutCLI flag for explicit overrideBufferOnlypreserves backward compat for JSON/pipe/CIMotivation
When CSA spawns long-running tools like codex, callers cannot distinguish "tool is thinking" vs "tool is hung" because stdout is fully buffered.
TeeToStderrforwards stdout lines to stderr with a[stdout]prefix, providing real-time visibility.Test plan
just pre-commit— all 820 unit tests + 8 e2e tests passcargo clippy --workspace -- -D warnings— zero warnings🤖 Generated with Claude Code