codex-plugin-cc
codex-plugin-cc copied to clipboard
Fix result lookup for active jobs
Users requesting the result of an active job receive a false “No job found” error.
Fixes #498.
Observable sequence
- Run
result <job-id>for a queued or running job. - Expected: report the job's current state and tell the user to try again after it finishes.
- Actual: report that no matching job exists.
Root cause and fix
Explicit references were matched only after filtering the job list to terminal states, so active jobs could never reach the existing active-state error. Match explicit references against all jobs first, then branch on the selected job's status.
The CLI regression test covers both queued and running jobs and verifies that neither is reported as missing.
Validation
- Focused regression: queued and running cases passed
- Full test suite: passed
pnpm run build: passedgit diff --check: clean
Actual screenshots
Before and after screenshots use the same stored running job and command.
Before — active job incorrectly reported missing
After — active job reports its actual state and next action