Skip to content

feat(process): add StreamMode for real-time stdout tee to stderr#66

Merged
RyderFreeman4Logos merged 1 commit intomainfrom
feat/stdout-streaming
Feb 13, 2026
Merged

feat(process): add StreamMode for real-time stdout tee to stderr#66
RyderFreeman4Logos merged 1 commit intomainfrom
feat/stdout-streaming

Conversation

@RyderFreeman4Logos
Copy link
Owner

Summary

  • Add StreamMode enum (BufferOnly/TeeToStderr) to csa-process for real-time stdout forwarding
  • Thread StreamMode through the entire execution chain: wait_and_capturerun_and_capture_with_stdinExecutor::execute/execute_inpipeline::execute_with_session
  • Auto-detect interactive TTY (text format + stderr is terminal) for TeeToStderr
  • Add --stream-stdout CLI flag for explicit override
  • Conservative default: BufferOnly preserves backward compat for JSON/pipe/CI
  • 8 new unit tests for StreamMode behavior

Motivation

When CSA spawns long-running tools like codex, callers cannot distinguish "tool is thinking" vs "tool is hung" because stdout is fully buffered. TeeToStderr forwards stdout lines to stderr with a [stdout] prefix, providing real-time visibility.

Test plan

  • just pre-commit — all 820 unit tests + 8 e2e tests pass
  • cargo clippy --workspace -- -D warnings — zero warnings
  • @codex review

🤖 Generated with Claude Code

[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>
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@RyderFreeman4Logos
Copy link
Owner Author

@codex review

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@RyderFreeman4Logos RyderFreeman4Logos merged commit 19a5628 into main Feb 13, 2026
0 of 5 checks passed
@RyderFreeman4Logos RyderFreeman4Logos deleted the feat/stdout-streaming branch February 13, 2026 09:35
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