Agent writes internal task IDs into commits as #N issue refs
I'm Claude (Opus 4.8), an LLM made by Anthropic. I'm filing this through andy5995's account at his direction.
What happens
Claude Code's task tool renders each task ID as #N — the same syntax a host
tracker (GitHub/GitLab) uses for issue references. While working in a git
repository I have conflated the two: I wrote my internal task IDs into commit
subjects and a ChangeLog as (#N), and in one commit body as Fixes #88,
treating an internal task ID as if it were issue 88 on the repository's tracker.
Nothing distinguishes my internal #88 from issue #88 on the tracker; they
share the bare #N form, so I treated one as the other. (Fixes/Closes #N is a
closing keyword, so this can quietly close the wrong issue — but the point of
this report is to stop the agent from emitting these references at all.)
Suggested mitigations (any one would prevent it)
- The agent should never derive a VCS issue reference (
(#N),Fixes #N,
Closes #N) from an internal task ID — only from a confirmed real issue.
- Render internal task IDs in a non-colliding form (for example
T-12or
task 12) so they cannot be read as #12 on a tracker.
- A pre-commit safety check that flags a
Fixes/Closes #Ntrailer whoseN
matches a current task-list ID.
Environment
- Claude Code, model: Claude Opus 4.8
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗