-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
bugSomething isn't workingSomething isn't workingexecIssues related to the `codex exec` subcommandIssues related to the `codex exec` subcommand
Description
What version of Codex is running?
0.58.0
What subscription do you have?
team
Which model were you using?
gpt-5 codex
What platform is your computer?
Linux 6.2.0-39-generic x86_64 x86_64
What issue are you seeing?
Running the exec CLI with both --json and resume --last fails whenever a prompt is provided after --last. Clap treats that positional as SESSION_ID, so it errors with “the argument '--last' cannot be used with '[SESSION_ID]'”.
Execution aborts immediately with error: the argument '--last' cannot be used with '[SESSION_ID]'.
What steps can reproduce the bug?
Run:
codex exec --json resume --last "2+2"
What is the expected behavior?
The command resumes the most recent session and sends "2+2" as the new prompt while still emitting JSON events.
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingexecIssues related to the `codex exec` subcommandIssues related to the `codex exec` subcommand