Skip to content

fix: resolve jobs across workspace registries#556

Draft
Epochex wants to merge 1 commit into
openai:mainfrom
Epochex:fix/cross-workspace-job-lookup
Draft

fix: resolve jobs across workspace registries#556
Epochex wants to merge 1 commit into
openai:mainfrom
Epochex:fix/cross-workspace-job-lookup

Conversation

@Epochex

@Epochex Epochex commented Jul 25, 2026

Copy link
Copy Markdown

Summary

  • resolve explicit status <job-id> and result <job-id> lookups across workspace state directories
  • retain exact-ID priority and reject ambiguous cross-workspace prefixes
  • verify that every discovered record belongs to the state directory derived from its declared workspace
  • tolerate a damaged unrelated workspace index while scanning healthy job registries

Fixes #524.

Root cause

Job metadata and result files are stored below a workspace-keyed state directory, but explicit lookups only searched the registry derived from the caller's current working directory. If Claude Code moved into another repository between dispatch and collection, the existing job remained on disk but became unreachable.

The fallback is intentionally limited to explicit job references. Unqualified status and result calls remain scoped to the current workspace and Claude session, so they do not unexpectedly surface unrelated jobs.

Safety and matching behavior

  • an exact job ID wins globally over prefix matches
  • a prefix must identify exactly one job across all workspace registries
  • records are ignored unless resolveStateDir(job.workspaceRoot) matches the directory containing the index
  • cancel behavior is unchanged

Validation

  • node --test tests/*.test.mjs under Linux / Node 22.23.1: 94 passed, 0 failed
  • focused state and job-control tests on Windows: 6 passed, 0 failed
  • node_modules/.bin/tsc.cmd -p tsconfig.app-server.json
  • git diff --check

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.

codex-companion: workspace-keyed job registry returns 'No job found' for completed jobs when cwd drifts into a git repo

1 participant