Skip to content

fix(exec): fail on missing explicit resume targets#3

Draft
middleDuckAi wants to merge 2 commits intoupstream-main-20260324from
middleDuck/codex-15538-15539-resume-missing-session
Draft

fix(exec): fail on missing explicit resume targets#3
middleDuckAi wants to merge 2 commits intoupstream-main-20260324from
middleDuck/codex-15538-15539-resume-missing-session

Conversation

@middleDuckAi
Copy link
Copy Markdown
Owner

@middleDuckAi middleDuckAi commented Mar 24, 2026

Summary

  • stop codex exec resume <id> from silently creating a new thread when the requested target is missing
  • keep resume --last behavior unchanged when there is no recorded thread to resume
  • add both unit-level and end-to-end regression coverage for missing explicit resume targets

Why

Issues openai#15538 and openai#15539 both come from the same fallback: when an explicit resume target cannot be resolved locally, codex exec resume was falling through to thread/start and creating a new thread.

This change keeps the fallback for resume --last, but makes explicit resume <id> fail clearly with Session not found: <id>.

Testing

  • cargo fmt --all
  • cargo test -p codex-exec resolve_resume_target
  • cargo test -p codex-exec exec_resume_by_missing_id_fails_without_starting_new_session
  • cargo test -p codex-exec exec_resume_by_ephemeral_id_fails_without_starting_new_session

Notes

  • This change is intentionally scoped to explicit resume targets.
  • Missing explicit ids now fail instead of silently starting a fresh thread.

@middleDuckAi middleDuckAi force-pushed the middleDuck/codex-15538-15539-resume-missing-session branch from 2d1eb4e to 7a45071 Compare March 24, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant