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
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- shell
- Área
- cli, developer-experience, tooling
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Shell
- Estrellas
- 38
- Forks
- 4
- Merge medio
- 5 h 26 min
- PR fusionados (30 d)
- 5
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de JetBrains/context
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
Marketplace Configuration File is missingPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
code_search (MCP): absolute pathFilter to another indexed checkout is silently ignored and returns results from the root repositoryQuizá libre de nuevo @Elizaveta239 la tomó hace 34 días y no hay ningún pull request abierto. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
-
Jbcontext requires login manually every dayQuizá libre de nuevo @Elizaveta239 la tomó hace 34 días y no hay ningún pull request abierto. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Todos los issues de JetBrains/context
Issues similares
-
[Config] Neo Coolcam NAS-WS01Z (0x0258:0x0003:0x1085): param 2 "Alarm Interval" is 1 byte, not 2Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 94/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
pearu/agent-sandbox#412 ·
Los mantenedores suelen responder en 1 día
-
fakephone selfcheck still expects the 16 px snap that ISS-39 replaced (1072x2336 vs 1080x2340)Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
ScoopInstaller/Nonportable#665 ·
-
bot-found documentation priority: P3
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
madenvel/KalinkaPlayer#602 ·