mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
# Summary Claude Code supports a useful prompt-plus-stdin workflow: ```bash echo "complex input..." | claude -p "summarize concisely" ``` Codex previously did not support the equivalent `codex exec` form. While `codex exec` could read the prompt from stdin, it could not combine piped input with an explicit prompt argument. This change adds that missing workflow: ```bash echo "complex input..." | codex exec "summarize concisely" ``` With this change, when `codex exec` receives both a positional prompt and piped stdin, the prompt remains the instruction and stdin is passed along as structured `<stdin>...</stdin>` context. Example: ```bash curl https://jsonplaceholder.typicode.com/comments \ | ./target/debug/codex exec --skip-git-repo-check "format the top 20 items into a markdown table" \ > table.md ``` This PR also adds regression coverage for: - prompt argument + piped stdin - legacy stdin-as-prompt behavior - `codex exec -` forced-stdin behavior - empty-stdin error cases --------- Co-authored-by: Codex <noreply@openai.com>
13 lines
249 B
Rust
13 lines
249 B
Rust
// Aggregates all former standalone integration tests as modules.
|
|
mod add_dir;
|
|
mod apply_patch;
|
|
mod auth_env;
|
|
mod ephemeral;
|
|
mod mcp_required_exit;
|
|
mod originator;
|
|
mod output_schema;
|
|
mod prompt_stdin;
|
|
mod resume;
|
|
mod sandbox;
|
|
mod server_error_exit;
|