Repository navigation
Fix harness link grants and oversized Lead resume replay - #80
Merged
Merged
Conversation
Harness read roots no longer follow symlinks or `.git` files that the agent can write in its workspace or profile. A `.git` file widens the home allowlist only when its worktree metadata names the checkout back and lies under the shared repository's `worktrees` directory. A native Lead resumed with a budget gate requested turn history for the usage replay. When that reply exceeded the 8 MiB stdio frame limit, the session failed and continuous cooling retried it indefinitely. The host now reopens the thread once with `excludeTurns`; the next turn's cumulative total still includes the skipped replay. An oversized frame that recurs after one cooldown stops the run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Harness read roots.
harnessReadRootsfollowed symlinks and.gitfiles in the launch workspace and profile and added their targets to the home allowlist. The agent can write both directories, so a link or forged.gitfile planted in one turn exposed home content such as~/theorem-os-runson the next launch. The link scan is replaced byworktreeMetadata. It follows a.gitfile only when the metadata directory sits outside the checkout, names the checkout back through itsgitdirfile, and lies under the shared repository'sworktrees/..lake/packageslinks still resolve through the trusted cache roots from the environment.Oversized Lead resume. A native team Lead with a budget gate and a direct provider resumes without
excludeTurnsto keep the usage replay. Once its history exceeded the 8 MiB stdio frame limit, startup failed withmath_codex_transport_closed:frame_too_large. The team kept the same root thread, so continuous cooling retried it every 300 s forever. Seen onbalance-full-prove2me.createCodexMathSessionnow reopens the thread once withexcludeTurns: truewhen that resume reply is too large. The next turn's cumulative total still includes the skipped replay.planResearchCooldownstops cooling an oversized frame that recurs after one cooldown. Othertransport_closedcauses cool as before.Tests
tests/harnessProcess.test.ts: planted links, nested links, forged and stranger.gitfiles and a symlinked.gitgrant only the declared roots, and bwrap cannot read the target. A verified worktree is still granted.tests/codexSessionAgentControl.test.ts: a budget-gated Lead with an 8 MiB history resumes on the second attempt withexcludeTurns. This test fails on main withframe_too_large.tests/workerRecovery.test.ts: covers the cooldown cutoff.tsc --noEmitandbun scripts/build.tspass.Not deployed. Running solvers are not changed by this PR.
🤖 Generated with Claude Code