feat: add task --resume-thread - #727
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cacf2270c1
ℹ️ 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".
| - If the forwarded request includes `--effort`, pass it through to `task`. | ||
| - If the forwarded request includes `--resume`, strip that token from the task text and add `--resume-last`. | ||
| - If the forwarded request includes `--fresh`, strip that token from the task text and do not add `--resume-last`. | ||
| - If the forwarded request includes `--resume-thread <id>`, strip both tokens from the task text and pass `--resume-thread <id>` to `task`; this resumes that exact Codex thread instead of the latest one. |
There was a problem hiding this comment.
Bypass rescue auto-routing for explicit threads
When /codex:rescue --resume-thread <id> is used while task-resume-candidate reports an existing current-session task, the upstream commands/rescue.md flow does not recognize this new routing flag, so it asks the continue/new-thread question and then prepends either --resume or --fresh. The companion subsequently rejects that request as conflicting, making explicit-thread resume unusable in this common scenario. Add --resume-thread to the rescue command's explicit-routing checks so it skips the candidate prompt and forwards the requested thread unchanged.
Useful? React with 👍 / 👎.
|
Addressed the P1 explicit-thread routing feedback in 08cd208: @codex review |
|
Note You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
sylvesterkaczmarek
left a comment
There was a problem hiding this comment.
Exact-thread precedence and the mutual-exclusion rules are coherent across foreground, background and rescue paths. One ownership boundary is worth pinning: --resume-thread bypasses the workspace/session candidate resolver and forwards the supplied thread ID directly to app-server. Please add a regression with a thread created under another repository proving native resume rejects or safely rebinds a foreign cwd rather than executing that thread in the current task workspace.
|
Pinned this boundary in Native behavior on
This matches the current Codex app-server contract: Validation: resume-thread runtime 4/4 PASS; commands/docs 8/8 PASS; fixture/runtime syntax and |
Summary
Fixes #700.
task --resume-thread <id>to resume an exact persisted Codex thread--resume-last,--resume,--fresh, and explicit-thread routing mutually exclusivecodex-cli-runtimerescue contractThe runtime already supported
resumeThreadId; this change wires that capability through the companion CLI and stored background task request.Validation
On Windows 11 / Node 26.3.1:
main: explicitthr_1created/resumedthr_3orthr_2insteadthreadId=thr_1node --check plugins/codex/scripts/codex-companion.mjsgit diff --cached --checkThe existing Node DEP0190 warning still appears on this Windows base; that is tracked separately by #717 and addressed by PR #725, not introduced here.