Skip to content

fix(llmadapters): accept a Claude session listing with no background jobs - #616

Closed
piekstra wants to merge 1 commit into
mainfrom
fix/claude-bg-discovery-session-listing
Closed

piekstra wants to merge 1 commit into
mainfrom
fix/claude-bg-discovery-session-listing

Conversation

@piekstra

Copy link
Copy Markdown
Contributor

Summary

claude agents --json lists every session, and only background sessions carry an id. A listing that holds only interactive sessions is non-empty but yields no job ids, so parseClaudeBGActiveJobs failed closed with "unrecognized non-empty JSON shape" and the reviewer's background job was lost.

The parser now recognizes the session-listing shape (a non-empty array whose every element is an object with a sessionId) and returns zero active jobs for it. Any other non-empty shape without ids still fails closed.

Fixture files under internal/llmadapters/testdata/ carry an interactive-only listing and a mixed listing; the tests assert the first yields no jobs and the second yields only the background id.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Repo scaffolding / maintenance

Checklist

  • I have read the contributing guide
  • My change follows the project structure and conventions
  • make tidy passes
  • make lint passes
  • make test passes, except TestPiRPCReviewerExtensionLoadsInInstalledPi, which fails identically on unmodified main against the locally installed pi CLI (Unknown options: --no-builtin-tools, --no-approve)
  • make build passes

Related Issues

Closes #615

…jobs

claude agents --json lists interactive sessions too, and only background
sessions carry an id, so an interactive-only listing failed discovery as an
unrecognized shape. Recognize the session-listing shape and return no
active jobs for it.

Closes #615
@piekstra

Copy link
Copy Markdown
Contributor Author

Superseded by a replacement PR with a corrected commit author.

@piekstra piekstra closed this Sep 22, 2026
@piekstra
piekstra deleted the fix/claude-bg-discovery-session-listing branch September 22, 2026 18:26
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.

Claude bg active-agent discovery fails on a session listing with only interactive sessions

1 participant