Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

repo_conventions injects AGENTS.md and CLAUDE.md as two blocks — identical content is paid twice when CLAUDE.md is a symlink/copy of AGENTS.md

Open Beginner friendly
#12,503 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@tachytelicdetonation is already working on this.

Since Sep 18, 2026.

  • #12475 by @tachytelicdetonation — open
  • #12728 by @macodev00 — closed without merging

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
ai

Research direction

Start at the repo_conventions case in the text-generation policy builder and inspect its readRepositoryInstructions calls for AGENTS.md and CLAUDE.md. Reproduce with CLAUDE.md as a symlink or identical copy, then verify the generated conventions prompt contains the shared content only once.

Written by the indexing model from the issue text.

Description

accepted bug via-triage

Summary

When generating commit messages / change-request descriptions, the repo_conventions text-generation policy appends the repository's AGENTS.md and CLAUDE.md as two separate blocks. A very common convention (recommended in the agents.md ecosystem and by Claude Code docs) is to keep CLAUDE.md as a symlink to (or byte-identical copy of) AGENTS.md. In that setup the same content is included twice in every such prompt — in our repo that is ~38k chars ≈ ~10k tokens, so ~20k tokens per generation for zero new information.

Where

Observed in the installed macOS app, T3 Code (Alpha) 0.0.42, app.asar (minified; the repo_conventions case of the text-generation policy builder):

case "repo_conventions": {
  const subjects = yield* readRecentCommitSubjects(cwd);
  const agentInstructions = yield* readRepositoryInstructions(cwd, "AGENTS.md");
  const claudeInstructions = settings.modelSelection.instanceId === "claudeAgent"
    || (yield* providerRegistry.getProviders).some((provider) =>
         provider.instanceId === settings.modelSelection.instanceId
         && provider.driver === "claudeAgent")
    ? yield* readRepositoryInstructions(cwd, "CLAUDE.md") : "";
  const examples = [
    ...subjects.length > 0 ? [["Recent commit subjects from this repository:", ...subjects].join("\n")] : [],
    ...agentInstructions ? [`Local AGENTS.md:\n${agentInstructions}`] : [],
    ...claudeInstructions ? [`Local CLAUDE.md:\n${claudeInstructions}`] : []
  ].join("\n\n");
  ...
}

readRepositoryInstructions reads through the symlink, so claudeInstructions ends up byte-identical to agentInstructions.

Repro

  1. Repo with a large AGENTS.md and CLAUDE.md -> AGENTS.md (symlink), Claude driver.
  2. Trigger commit-message / change-request generation.
  3. The conventions prompt contains Local AGENTS.md: and Local CLAUDE.md: blocks with the same content.

Proposed fix

Dedup by content after reading — cheapest form is a one-line guard:

...claudeInstructions && claudeInstructions !== agentInstructions
  ? [`Local CLAUDE.md:\n${claudeInstructions}`] : []

(String equality covers symlinks, hardlinks and manual copies alike; a content hash works too if the strings are large. Resolving symlinks alone would miss the copy case.)

Dominant language
TypeScript
Stars
24.8k
Forks
6.4k
Avg merge
7h 29m
Merged PRs (30d)
223

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pingdotgg/t3code

All issues in pingdotgg/t3code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.