Skip to content

fix: sandbox, turn cap and model default in AI review workflows - #12

Open
edg-l wants to merge 1 commit into
mainfrom
fix/codex-lfs-sandbox-and-claude-max-turns
Open

fix: sandbox, turn cap and model default in AI review workflows#12
edg-l wants to merge 1 commit into
mainfrom
fix/codex-lfs-sandbox-and-claude-max-turns

Conversation

@edg-l

@edg-l edg-l commented Jul 27, 2026

Copy link
Copy Markdown

Four fixes, all found while looking at why the AI review on lambdaclass/ethrex#7029 came back half broken.

Codex reviews fail in repos that use git LFS. Codex runs with --sandbox workspace-write, whose writable roots are [workdir, /tmp, $TMPDIR], and .git is excluded even though it sits inside the workdir. actions/checkout leaves LFS-tracked files as pointers, so the LFS filters run on every git command and try to write .git/lfs/tmp:

/bin/bash -lc 'git status --short'  → exited 128
Error cleaning Git LFS object: open /home/runner/work/ethrex/ethrex/.git/lfs/tmp/2849842397: read-only file system

git lfs uninstall --local before the codex step drops the filters. It has to happen outside the sandbox, since inside it cannot write .git/config either. Picked this over lfs: true on checkout so review runs don't download LFS objects they never read.

Claude reviews are thrown away when they hit the turn cap. On ethrex the run ended with subtype: error_max_turns, exit 1, and no comment, because a capped run has no result field and the post step is skipped once the action fails. Raised the default cap 30 to 35, added always() to the post step, and made the script fall back to the last assistant message with a > Partial review: <reason> line. The job still goes red, but the review that was already written gets posted.

Codex model default gpt-5.4 to gpt-5.6-terra. Same rate card, so this is free: $2.50 input, $0.25 cached input, $15 output per 1M tokens on both, and both move to $5.00/$22.50 on the long-context meter. Terra also brings a 1.05M context window and 128K max output. Note the ID has to be spelled out, since the bare gpt-5.6 alias routes to Sol at $5/$30.

Bubblewrap. Codex logs could not find bubblewrap on PATH and falls back to its bundled copy, so install it.

Untested from my side: whether the codex CLI pinned in openai/codex-action@v1 accepts the gpt-5.6-terra string. Worth a /codex on a throwaway PR before this reaches every repo on @v1.

Not touched: claude's checkout is fetch-depth: 1, so it burns turns running git fetch origin main --depth=1 to get a diff base. That is probably part of why it hits the cap at all. There is already a fix/claude-fetch-depth branch for it.

- codex: detach git LFS filters, they fail inside the read-only .git of the
  workspace-write sandbox and break every git command with exit 128
- codex: install bubblewrap so it stops falling back to its bundled copy
- codex: default model gpt-5.4 -> gpt-5.6-terra (same rate card)
- claude: max_turns 30 -> 35, and post the review even when the run hits the
  cap instead of dropping it and leaving a bare red check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant