feat(daemon): advise session list readers about cross-workspace claims

Closed
ST
5d ago
+327-31

Summary

session list answers for one workspace scope, so a caller in a second checkout sees an empty list while a daemon in another state dir holds the device they are about to claim — audited sessions then reused foreign cwd: session names 65 times rather than risk the invisible holder. The list response now attaches a cross-workspace claim advisory when inspectDeviceClaims shows live claims outside the queried scope, so the caller learns the device is busy and who holds it before attempting anything.

3 files changed (inventory response, advisory plumbing, tests).

Validation

  • Head: 0a516a6c6 on a68693c72 (includes review-fix commit).
  • pnpm run typecheck, pnpm run lint, inventory tests, integration-progress --check, fallow, freerange: pass locally.
  • Independent cold review: applied. CI runs the full gates on push.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.