Agent writes internal task IDs into commits as #N issue refs

Open 💬 1 comment Opened Jun 22, 2026 by andy5995
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)

  1. 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.

  1. Render internal task IDs in a non-colliding form (for example T-12 or

task 12) so they cannot be read as #12 on a tracker.

  1. A pre-commit safety check that flags a Fixes/Closes #N trailer whose N

matches a current task-list ID.

Environment

  • Claude Code, model: Claude Opus 4.8

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗