fix(cli): check fails a session that belongs to another project
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- cli, observability
Research direction
Start in cli/src/contexts/telemetry/domain/telemetry-claim.ts at sessionAnchoredClaim and compare its handling with noAnchorClaim. Inspect the existing project_id data or transcript lookup described in the issue, then make the anchored-session result distinguish a different project as unknown while keeping this project's missing run file as fail.
Written by the indexing model from the issue text.
Description
Description
aidd telemetry check reports hook fired FAIL — this session left no run file when the anchored session belongs to a different project. The hook is fine; the session simply never worked in this repository.
The anchor is inherited: any process nested inside a Claude Code session sees CLAUDE_CODE_SESSION_ID, whatever directory it runs in. resolveSessionAnchor (cli/src/contexts/telemetry/domain/session-anchor.ts) already documents that inheritance for the Codex-inside-Claude case and orders the variables accordingly, but nothing downstream asks whether the anchored session belongs to this project.
So a user running check from a shell that another tool's session spawned — an agent running the 02-check skill against a second repository, a terminal opened inside an editor session, a CI step under an agent — is told the chain is broken when it is not. That is the failure this layer forbids elsewhere: an unknown shown as a negative instead of being named.
Affected
cli/src/contexts/telemetry/domain/telemetry-claim.ts — sessionAnchoredClaim, reason session-left-no-run-file
Expected
Three distinguishable answers, as the claim already models them:
- the anchored session journalled here →
ok - no anchor at all →
unknown, whichnoAnchorClaimalready returns - an anchor that belongs to another project →
unknown, naming that, notfail
fail stays for what it means: this project's own session ran and the hook wrote nothing.
Observed
hook fired FAIL this session left no run file — the newest one is from 2026-09-16T03:30:54Z
session journalled ok 3 of 5 run file(s) carry more than session_start
records join ok 12 of 20 record(s) joined a step, 8 unattributed
Every other claim on the same run says the chain records. Only the anchored-session claim fails, and it fails for a session that was never supposed to appear in this repository.
Steps
- Open a Claude Code session in project A.
- From that session, run
aidd telemetry checkin project B, where measurement is on and sessions have been journalled. hook firedreports FAIL, naming a run file that has nothing to do with the anchored session.
Possible direction, not a prescription
The data to tell the two apart is already read by this command:
- the stored records carry
vendor_idandproject_id, so an anchor found under another project is decidable; - Claude Code's own transcript for a session id sits under its project directory, and the
tool files readableclaim already walks those files.
Either source answers "is this anchor this project's session"; neither needs a new input. The change is one reason, one branch, and its display string.
Environment
- Tool: Claude Code
- CLI: 5.3.0
- Plugin: aidd-telemetry 0.2.0
- OS: macOS
🤖 Generated with Claude Code
- Dominant language
- TypeScript
- Stars
- 481
- Forks
- 45
- Avg merge
- 17h 40m
- Merged PRs (30d)
- 106
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ai-driven-dev/framework
-
refactor(aidd-orchestrator): the check zone says when to stop, and reviews its axes in one round Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ai-driven-dev/framework#887 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ai-driven-dev/framework#873 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ai-driven-dev/framework#625 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ai-driven-dev/framework#467 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
ai-driven-dev/framework#891 · 1 comment ·
All issues in ai-driven-dev/framework
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·