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
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- shell
- Ambito
- cli, developer-experience, tooling
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Shell
- Stelle
- 38
- Fork
- 4
- Merge medio
- 5h 26m
- PR unite (30g)
- 5
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di JetBrains/context
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
Marketplace Configuration File is missingForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
code_search (MCP): absolute pathFilter to another indexed checkout is silently ignored and returns results from the root repositoryForse di nuovo libera @Elizaveta239 l’ha presa 34 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Jbcontext requires login manually every dayForse di nuovo libera @Elizaveta239 l’ha presa 34 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Tutte le issue di JetBrains/context
Issue simili
-
[Config] Neo Coolcam NAS-WS01Z (0x0258:0x0003:0x1085): param 2 "Alarm Interval" is 1 byte, not 2Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 94/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
pearu/agent-sandbox#412 ·
I maintainer di solito rispondono entro 1 giorno
-
fakephone selfcheck still expects the 16 px snap that ISS-39 replaced (1072x2336 vs 1080x2340)Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
ScoopInstaller/Nonportable#665 ·
-
bot-found documentation priority: P3
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
madenvel/KalinkaPlayer#602 ·