Files
codex/codex-rs/exec/tests/fixtures/cli_responses_fixture.sse
T
Michael Bolin 573de826fb feat: codex exec writes only the final message to stdout
This updates `codex exec` so that, by default, most of the agent's activity is
written to stderr so that only the final agent message is written to stdout.
This makes it easier to pipe `codex exec` into another tool without extra filtering.

I introduced `#![deny(clippy::print_stdout)]` to help enforce this change and
renamed the `ts_println!()` macro to `ts_msg()` because (1) it no longer calls
`println!()` and (2), `ts_eprintln!()` seemed too long of a name.

While here, this also adds `-o` as an alias for `--output-last-message`.

Fixes https://github.com/openai/codex/issues/1670
2025-10-02 22:55:10 -07:00

13 lines
410 B
Plaintext

event: response.created
data: {"type":"response.created","response":{"id":"resp1"}}
event: response.output_item.done
data: {"type":"response.output_item.done","item":{"type":"message","role":"assistant","content":[{"type":"output_text","text":"model: gpt-5-high
sandbox: workspace-write
resume marker"}]}}
event: response.completed
data: {"type":"response.completed","response":{"id":"resp1","output":[]}}