fix(jobs): clearer "job not found" hint for Claude Code background ids (#7)#13
Merged
Conversation
…b id (#7) When /cursor:delegate runs as a Claude Code background command, Claude Code surfaces its own wrapper id ("Command running in background with ID: …"), not the Cursor job id. /cursor:status <that-id> then missed with a bare "No job … found" and the user had no obvious recovery path. status / result / cancel now append a shared hint (lib/hints.mjs# jobNotFoundMessage) explaining the id mismatch and pointing at the no-arg listing to recover the real id. Unit tests cover the message. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #7.
When
/cursor:delegateruns as a Claude Code background command, Claude Code surfaces its own wrapper id (Command running in background with ID: …), not the Cursor job id./cursor:status <that-id>then missed with a bareNo job … found for this repository.and the user had no obvious way to recover the real id./cursor:status,/cursor:result, and/cursor:cancelnow append a shared hint explaining the id mismatch and pointing at the no-arg listing (/cursor:statuswith no arguments lists tracked jobs) to recover the real id.Approach
scripts/lib/hints.mjs#jobNotFoundMessage(id)— one source of truth for the not-found message + hint, wired into all three commands.<cc-id>.outputfilename format, which can change. The always-on hint (remedy refactor: zero runtime deps + plain .mjs sources (no build step) #3) is robust and dependency-free.delegate.mjsoutput (remedy feat: initial plugin scaffold (v0.1.0) #1), so no change needed there.Test plan
npm test— 87/87 passing (3 new intests/hints.test.mjs)npm run lint— Prettier cleanstatus/result/cancelwith a fake CC-style id now print the hint and exit 1🤖 Generated with Claude Code