Repository navigation
Description
Codex review loads skills/pr-review/SKILL.md through exec_command. Codex 0.157.0 cuts exec output at 10,000 tokens by keeping the first and last halves:
- codex-rs core/src/unified_exec/mod.rs:79 (DEFAULT_MAX_OUTPUT_TOKENS = 10_000)
- core/src/tools/context.rs:482-489 (the smaller of the requested budget and the model's truncation_policy, which is 10,000 for every bundled model)
- utils/string/src/truncate.rs:126-127 (keeps head and tail, drops the middle)
pr-review/SKILL.md on main is 1,425 lines and 67,464 bytes (~16.8k tokens). A single read keeps up to about line 367 and from about line 980, and drops steps 3c-1 through 6d: security triage, risk, context packages, scope constraints, dispatch, collect and merge.
Codex's base prompt tells the model to continue after a truncated read. In 0.157.0 rollouts it did not:
- The root read lines 241-1435 in one call, got
Warning: truncated output (original token count: 13620), and went on to dispatch without rereading. - Two other roots read only lines 1-240.
- A root told to read at most 200 lines per call read all 1,425 lines with no truncation.
These rollouts come from the native sub-agent branch (fullsend-ai/agents#1542), but the read happens before any dispatch. Main's single-context path (codexNoSubagentNote) reads the same file with the same cap.
Retro is not affected: its four skills are 12 KB or less. skills/code-implementation/SKILL.md (49 KB) is over the cap for a Codex code agent.
Options:
- One paragraph in agents/review.md "Skill routing":
wc -l, thensed -nranges of at most 200 lines, one per tool call, rereading any range marked truncated. agents/*.md is not context-budget checked; skillsaw passes. - The same rule, made generic, in fullsend's Codex runtime note (internal/runtime/codex_bootstrap.go codexNoSubagentNote), which covers every Codex agent.
pr-review/SKILL.md is at its skillsaw context-budget ceiling (16,784), so the rule cannot go in the skill itself without a baseline bump.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fullsend-ai-triage commentedon Sep 29, 2026
🤖 Finished Triage · ✅ Success · Started 1:30 PM UTC · Completed 1:34 PM UTC
Commit:
c1724dc· View workflow run →Runtime: claude · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $0.36
fullsend-ai-triage commentedon Sep 29, 2026
This report already pins the root cause precisely: Codex's
unified_execoutput cap (10,000 tokens, keeping head and tail) truncates single-call reads ofSKILL.mdfiles that exceed it, andcodexNoSubagentNoteininternal/runtime/codex_bootstrap.go-- which every Codex agent's instructions include on the single-context path -- currently has no rule telling the model to read such files in bounded chunks.Investigation confirms both halves of the report against the current checkout:
docs/agents/review.md's "Skill routing" section has no chunked-read guidance today.codexNoSubagentNotelikewise has no such rule, and it is the shared note appended to every Codex agent (not just review), so the exposure is broader than just the pr-review skill.review.md's native sub-agent path in the agents repo -- it does not touchcodexNoSubagentNote, so it does not close the general gap this issue describes onmain. No open PR in this repo currently addressescodexNoSubagentNoteitself.Recommended fix: add the equivalent chunked-read rule generically to
codexNoSubagentNote, so it protects every Codex agent's single-context path, and keep the wording aligned with what #1542 is adding on the sub-agent side. Worth also checkingskills/code-implementation/SKILL.md(49KB), which is already flagged in the report as over the cap.Severity is set to high because the failure mode is silent -- a Codex review run could skip security-relevant steps (security triage, risk assessment, scope constraints) with no visible error.
Labels: Matches the labeling pattern used for prior Codex-runtime defects (#7264, #7725): a confirmed bug in the runtime/harness skill-loading path, high priority because the failure is silent and can drop security-relevant review steps.
Next steps:
/fs-code— agent creates a PR to implement this issue/fs-code <your instruction>— agent implements with your specific guidancefullsend-ai-coder commentedon Sep 29, 2026
🤖 Finished Code · ✅ Success · Started 1:36 PM UTC · Completed 1:48 PM UTC
Commit:
c1724dc· View workflow run →Runtime: pi · Model: xai/grok-4.6 · Effort: high · Cost: $4.61
fix(#7831): make chunked-read reread rule an explicit split, fix bump…
fix(#7831): assert the retry-partition wording in the chunked-read tests
fix(#7831): count lines with awk so an unterminated last line is read
fix(fullsend-ai#7831): chunk long Codex skill reads in the runtime note
Merge pull request fullsend-ai#7832 from fullsend-ai/agent/7831-codex…
refactor(codex): open every role with the child runtime note
fix(fullsend-ai#9657): tighten codex dispatch note and cap wait_agent…