Skip to content

Fix result lookup for active jobs#536

Open
Kevinjohn wants to merge 1 commit into
openai:mainfrom
Kevinjohn:fix/active-result-message
Open

Fix result lookup for active jobs#536
Kevinjohn wants to merge 1 commit into
openai:mainfrom
Kevinjohn:fix/active-result-message

Conversation

@Kevinjohn

@Kevinjohn Kevinjohn commented Jul 19, 2026

Copy link
Copy Markdown

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
Kevinjohn marked this pull request as ready for review July 20, 2026 12:22
@Kevinjohn
Kevinjohn requested a review from a team July 20, 2026 12:22
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.

result <id> on a queued/running job reports "No job found" — the still-running message is unreachable when a reference is given

1 participant