Conversation
pakrym-oai
reviewed
Oct 3, 2025
|
|
||
| event: response.output_item.done | ||
| data: {"type":"response.output_item.done","item":{"type":"message","role":"assistant","content":[{"type":"output_text","text":"fixture hello"}]}} | ||
| data: {"type":"response.output_item.done","item":{"type":"message","role":"assistant","content":[{"type":"output_text","text":"model: gpt-5-high |
Collaborator
There was a problem hiding this comment.
this doesn't look right
Collaborator
Author
There was a problem hiding this comment.
hmm, not sure why that changed...
Collaborator
Author
There was a problem hiding this comment.
Oh, I think Codex was hacking this to fix the test...
pakrym-oai
reviewed
Oct 3, 2025
| } | ||
|
|
||
| // If the user has not piped the final message to a file, they will see | ||
| // it twice: once written to stderr as part of the normal event |
pakrym-oai
approved these changes
Oct 3, 2025
699f147 to
e180cd6
Compare
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 #1670
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This updates
codex execso 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 pipecodex execinto another tool without extra filtering.I introduced
#![deny(clippy::print_stdout)]to help enforce this change and renamed thets_println!()macro tots_msg()because (1) it no longer callsprintln!()and (2),ts_eprintln!()seemed too long of a name.While here, this also adds
-oas an alias for--output-last-message.Fixes #1670