setup-agent: Codex, Junie and Claude Code overwrite each other's block in one AGENTS.md; the Junie block names tools other agents do not have
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- shell
調査の方向性
Start by running the reproduction steps in the issue: the three jbcontext setup-agent --scope project --instructions commands, watching the block between <!-- jbcontext-instructions-start --> and the end marker in AGENTS.md change each time. Then follow the setup-agent code path that resolves the project instruction file (including a CLAUDE.md symlink) and the per-agent instruction text written into it. Done means a shared target ends up with one order-independent, agent-neutral block — or setup warns that another agent already manages the file — plus a README.md note for updates.skip-agents-on-upgrade.
索引モデルが issue の本文から書いたものです。
説明
Version: jbcontext 0.9.21 (build 1593), macOS.
What happens
For --scope project, Codex and Junie CLI both use <repo>/AGENTS.md as the instruction file (setup-agent --dump-auto shows it). Each agent writes its own text between <!-- jbcontext-instructions-start --> and <!-- jbcontext-instructions-end -->, so whichever agent was set up last wins.
jbcontext upgrade refreshes every registered agent. As a result, after an upgrade the block inside a committed AGENTS.md can switch to another agent's variant, and AGENTS.md shows as modified in git status for everyone on the team who upgrades.
Many repositories also symlink CLAUDE.md -> AGENTS.md to keep a single instruction file across agents. Because setup-agent writes through an in-repository symlink, setting up Claude Code replaces the same block in AGENTS.md.
Since #56, the Junie block tells the agent to "use grep_search" and to "open the files it returns with open". When AGENTS.md is shared, Codex, Claude Code and other agents read these instructions too, and they have no tools with those names.
Steps to reproduce
git init demo && cd demo
echo "# Project rules" > AGENTS.md
ln -s AGENTS.md CLAUDE.md
jbcontext setup-agent --agent codex --scope project --instructions --non-interactive
jbcontext setup-agent --agent junie --scope project --instructions --non-interactive
jbcontext setup-agent --agent claude --scope project --instructions --non-interactive
After each command, AGENTS.md contains one pair of markers, but its content and checksum change three times: first the Codex block, then the Junie block with grep_search and open, then the Claude Code block. The symlink stays intact.
Expected
When several registered agents resolve to the same instruction file (directly or through a symlink), the file gets one block that does not depend on the order of setup and does not name tools of one agent only. Two possible ways:
- Write one agent-neutral block when the target is a shared file such as
AGENTS.md. - Keep
AGENTS.mdagent-neutral and put agent-specific tool hints in files that only that agent reads.
At a minimum, setup-agent could warn when the target file is already managed for another agent.
Workaround
We commit .jbcontext.json with "skipAgentsOnUpgrade": true (written by jbcontext config set --shared updates.skip-agents-on-upgrade true) and maintain the AGENTS.md block by hand. The v0.9.12 release notes mention this setting, but README.md does not; a line there would help other teams that commit AGENTS.md.
- 主要言語
- Shell
- スター
- 38
- フォーク
- 4
- 平均マージ
- 5時間 26分
- マージ済み PR(30日)
- 5
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
JetBrains/context のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
Marketplace Configuration File is missing対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
code_search (MCP): absolute pathFilter to another indexed checkout is silently ignored and returns results from the root repository再び着手できるかも @Elizaveta239 が 34 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
Jbcontext requires login manually every day再び着手できるかも @Elizaveta239 が 34 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
JetBrains/context の issue をすべて見る
似ている issue
-
[Config] Neo Coolcam NAS-WS01Z (0x0258:0x0003:0x1085): param 2 "Alarm Interval" is 1 byte, not 2オープン
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pearu/agent-sandbox#412 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
ScoopInstaller/Nonportable#665 ·
-
bot-found documentation priority: P3
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
madenvel/KalinkaPlayer#602 ·