codex-plugin-cc icon indicating copy to clipboard operation
codex-plugin-cc copied to clipboard

Fix result lookup for active jobs

Open Kevinjohn opened this issue 4 months ago • 0 comments

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: passed
  • git diff --check: clean

Actual screenshots

Before and after screenshots use the same stored running job and command.

Before — active job incorrectly reported missing

The result command on main reports that the stored running job cannot be found

After — active job reports its actual state and next action

The same result command on the fix branch reports that the job is still running

Kevinjohn avatar Jul 19 '26 23:07 Kevinjohn