Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#12,503 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@tachytelicdetonation がすでに取り組んでいます。

2026年9月18日 から。

  • #12475 @tachytelicdetonation による — オープン
  • #12728 @macodev00 による — マージされずにクローズ

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
ai

調査の方向性

テキスト生成ポリシービルダーの repo_conventions ケースから始め、AGENTS.md と CLAUDE.md に対する readRepositoryInstructions 呼び出しを調査します。CLAUDE.md をシンボリックリンクまたは同一のコピーにして再現し、生成された規約プロンプトに共有コンテンツが 1 回だけ含まれることを確認します。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
TypeScript
スター
24.8k
フォーク
6.4k
平均マージ
7時間 29分
マージ済み PR(30日)
223

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pingdotgg/t3code のほかの issue

pingdotgg/t3code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。