roles: tell each Codex role the output-size and rm rules once, not in each spec

Abierto
#78 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
tooling

Línea de trabajo

Trace how a --host codex launch produces role_prompt.md, starting with shared/dev-team/roles/*.md, adapters/codex.toml, and plugins/dev-team/codex/agents/*.toml. Read AGENTS.md for the independent review requirement, then update the role prompt source and shared/dev-team/skills/orchestrate/references/codex.md; check that no spec template repeats the rules. Run python3 scripts/build.py and verify a Codex dry run includes both rules while a Claude launch does not.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

next

Problem

Two rules for Codex roles are known, but no plugin file states them. Thus the orchestrator copies them into the Permissions line of each spec by hand. When it forgets, the role fails.

  1. The output of one model turn is limited. On 2026-12-01 (Codex CLI 0.172.0, gpt-6.1-sol, medium effort), an implementer for a new 1,900-line feature wrote whole source files in single cat <<EOF heredocs, about 7,000 characters each. The next response stopped with:
    {"type":"turn.failed","error":{"message":"Incomplete response returned, reason: max_output_tokens"}}
    
    The run ended. The files of earlier turns stayed in the worktree with no commit, and the crate did not compile. The file of the failed turn was lost. The orchestrator then added this line to the spec: "Keep each command or patch to about 150 lines; commit at each step." The next launches with that line had no output-limit failure. Later specs sometimes did not have the line, because the orchestrator added it by hand.
  2. The Codex command runner refuses rm -f and rm -rf. The project that found this records it in its own notes. The orchestrator copied "leave scratch files in place, outside the worktree" into each spec by hand.

Proposed change

State each rule once, where each Codex role reads it:

  • Add both rules to the Codex role prompt that the launcher writes (role_prompt.md). The source is probably shared/dev-team/roles/*.md with a Codex-only part, or the Codex adapter (adapters/codex.toml, plugins/dev-team/codex/agents/*.toml). Find which file produces role_prompt.md for --host codex.
  • The first rule says what to do, not what to avoid. For example: "Write a large file in parts of about 150 lines: create it with the first part, then add each part with a patch. Commit after each working step, so a stopped turn loses at most one step."
  • The second rule: "Leave temporary files in place, in a directory outside the worktree. The command runner refuses rm -f and rm -rf."
  • Write one line about each rule in shared/dev-team/skills/orchestrate/references/codex.md, so that the orchestrator does not copy them into a spec.

Acceptance

  • role_prompt.md of a --dry-run Codex launch contains both rules. A Claude launch does not.
  • No spec template text repeats them.
  • Do the edits in shared/ and adapters/, then run python3 scripts/build.py. This change needs an independent review (AGENTS.md).

Related

#77 (failure causes in dispatch.json, cause: max_output_tokens) is the companion to this one. This issue prevents the failure. That issue reports it.

Lenguaje dominante
Python
Estrellas
0
Forks
0
Merge medio
29 min
PR fusionados (30 d)
57

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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de j3ko/agent-plugins

Todos los issues de j3ko/agent-plugins

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.