fix(tui): accept prompts with resume and fork#26818
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b1e12943b7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
etraut-openai
left a comment
There was a problem hiding this comment.
I manually tested the change. Looks good.
Why
Interactive
codex resumeandcodex forkexpose both a session ID positional and an initial prompt positional. With--last, Clap still assigns the first positional to the session ID, so a command such ascodex fork --last "/compact focus on auth"either fails parsing or attempts to look up the prompt as a session ID instead of sending it to the latest session.This makes it impossible to select the latest session and immediately provide a follow-up prompt, even though
codex exec resume --lastalready supports that workflow.What Changed
resume --lastorfork --lastis used and no explicit second prompt was parsed.resume SESSION_ID PROMPTandfork SESSION_ID PROMPTbehavior.How to Test
codex resume --last "continue from the latest session".codex fork --last "take a different approach".codex resume SESSION_ID "continue here"andcodex fork SESSION_ID "branch here"still target the explicit session and submit the prompt.Targeted tests:
just test -p codex-cli(267 passed)