Resume a non-interactive session
exec & automation
// what it does
Exec sessions persist like interactive ones. codex exec resume --last continues the most recent with a new instruction, or pass a session id to target a specific one — letting you chain CI steps that build on prior context, all without a TUI.
// shell
$ codex exec resume --last "now fix the issues you found"$ codex exec resume 01jabc23session "continue the migration"// gotcha
--last is scoped to sessions from the current repo, so a fresh CI checkout has none to resume. If you need to chain across jobs, capture the session id from the first run and pass it explicitly.