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
Maintainers usually reply within 1 day
@tachytelicdetonation is already working on this.
Since Sep 18, 2026.
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
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
- Repo with a large
AGENTS.mdandCLAUDE.md -> AGENTS.md(symlink), Claude driver. - Trigger commit-message / change-request generation.
- The conventions prompt contains
Local AGENTS.md:andLocal 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
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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 pingdotgg/t3code
-
bug via-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
pingdotgg/t3code#15682 · 1 comment ·
Maintainers usually reply within 1 day
-
bug via-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
pingdotgg/t3code#15659 · 1 comment ·
Maintainers usually reply within 1 day
-
bug via-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
pingdotgg/t3code#15558 · 1 comment ·
Maintainers usually reply within 1 day
-
invalid via-triage
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
pingdotgg/t3code#15405 · 1 comment ·
Maintainers usually reply within 1 day
-
bug via-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
pingdotgg/t3code#15380 · 1 comment ·
Maintainers usually reply within 1 day
All issues in pingdotgg/t3code
Similar issues
-
skills.mdx: ReadResourceDirectoryRequest does not type-check against the 2026-07-28 base schemaOpen
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
modelcontextprotocol/ext-skills#156 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
MystenLabs/MemWal#1104 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Effect-TS/effect#8728 · 1 comment ·
Maintainers usually reply within 1 day
-
account-pool bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
lidge-jun/opencodex#6571 · 1 comment ·
Maintainers usually reply within 1 day
-
check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day