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

Aperta
#78 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
tooling

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
0
Fork
0
Merge medio
29m
PR unite (30g)
57

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di j3ko/agent-plugins

Tutte le issue di j3ko/agent-plugins

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.