Repository navigation
fix(hooks)!: resolve the hook interpreter and hook PATH from directories the agent cannot write - #8605
Conversation
PR Summary by QodoPin Claude Code and codex hooks to a trusted interpreter and PATH
AI Description
Diagram
High-Level Assessment
Files changed (14)
|
|
🤖 Finished Review · ✅ Success · Started 6:02 AM UTC · Completed 6:11 AM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.09 |
Code Review by Qodo
1.
|
Site previewPreview: https://62e5c41f-site.fullsend-ai.workers.dev Commit: |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
<!-- fullsend:risk-assessment --> DetailsModerate risk is maintained reflecting a medium change size across 18 files in an active runtime subsystem with high recent commit churn, balanced by zero protected path changes, no dependency updates, solid test coverage, and a well-aligned referenced issue. Previous run<!-- fullsend:risk-assessment --> DetailsModerate risk reflects a medium change size across 16 files in an active runtime subsystem with high recent commit churn, balanced by zero protected path changes, no dependency updates, solid test coverage, and a well-aligned referenced issue. Previous run (2)<!-- fullsend:risk-assessment --> DetailsModerate change size across runtime files with high recent commit churn, offset by zero protected path or dependency changes, solid test coverage, and close alignment with an active follow-up issue. Previous run (3)<!-- fullsend:risk-assessment --> DetailsModerate change size across runtime files with high recent commit churn, offset by zero protected path or dependency changes, good test additions, and close alignment with an active follow-up issue. |
ReviewFindingsLow
Previous run<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJhcHByb3ZlIiwiZmluZGluZ3MiOlt7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJ0ZXN0LWluYWRlcXVhdGUiLCJmaWxlIjoiaW50ZXJuYWwvcnVudGltZS9jb2RleF9ob29rX3Rlc3QuZ28iLCJpZCI6ImZfNTQ0ODFiN2I1ZDg4YTIxOSIsImxpbmUiOjk4OCwiYWN0aW9uYWJsZSI6dHJ1ZX0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoibmFtaW5nLWNvbnZlbnRpb24iLCJmaWxlIjoiaW50ZXJuYWwvcnVudGltZS9jb2RleF9ob29rL2Z1bGxzZW5kLWNvZGV4LWhvb2sucHkiLCJpZCI6ImZfM2E3N2ZlYTgzZmY5ZTI2MCIsImxpbmUiOjk2LCJhY3Rpb25hYmxlIjp0cnVlfV0sImRpc3Bvc2l0aW9ucyI6W3siaWQiOiJmXzU0NDgxYjdiNWQ4OGEyMTkiLCJzdGF0dXMiOiJyZXNvbHZlZF9ieV9jaGFuZ2UifSx7ImlkIjoiZl8zYTc3ZmVhODNmZjllMjYwIiwic3RhdHVzIjoicmVzb2x2ZWRfYnlfY2hhbmdlIn1dfQ== --> Looks good to me Previous run (2)<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJhcHByb3ZlIiwiZmluZGluZ3MiOlt7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJ0ZXN0LWluYWRlcXVhdGUiLCJmaWxlIjoiaW50ZXJuYWwvcnVudGltZS9jb2RleF9ob29rX3Rlc3QuZ28iLCJpZCI6ImZfNTQ0ODFiN2I1ZDg4YTIxOSIsImxpbmUiOjk4OCwiYWN0aW9uYWJsZSI6dHJ1ZX0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoibmFtaW5nLWNvbnZlbnRpb24iLCJmaWxlIjoiaW50ZXJuYWwvcnVudGltZS9jb2RleF9ob29rL2Z1bGxzZW5kLWNvZGV4LWhvb2sucHkiLCJpZCI6ImZfM2E3N2ZlYTgzZmY5ZTI2MCIsImxpbmUiOjk2LCJhY3Rpb25hYmxlIjp0cnVlfV0sImRpc3Bvc2l0aW9ucyI6W3siaWQiOiJmXzU0NDgxYjdiNWQ4OGEyMTkiLCJzdGF0dXMiOiJyZXNvbHZlZF9ieV9jaGFuZ2UifSx7ImlkIjoiZl8zYTc3ZmVhODNmZjllMjYwIiwic3RhdHVzIjoicmVzb2x2ZWRfYnlfY2hhbmdlIn1dfQ== --> Looks good to me Earlier findings
Previous run (3)<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6InRlc3QtaW5hZGVxdWF0ZSIsImZpbGUiOiJpbnRlcm5hbC9ydW50aW1lL2NvZGV4X2hvb2tfdGVzdC5nbyIsImlkIjoiZl81NDQ4MWI3YjVkODhhMjE5IiwibGluZSI6OTg4LCJhY3Rpb25hYmxlIjp0cnVlfSx7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJuYW1pbmctY29udmVudGlvbiIsImZpbGUiOiJpbnRlcm5hbC9ydW50aW1lL2NvZGV4X2hvb2svZnVsbHNlbmQtY29kZXgtaG9vay5weSIsImlkIjoiZl8zYTc3ZmVhODNmZjllMjYwIiwibGluZSI6OTYsImFjdGlvbmFibGUiOnRydWV9XX0= --> ReviewFindingsLow
Next steps:
|
|
/fs-fix-stop |
|
Fix agent disabled for this PR. Remove the |
|
🤖 Finished Review · ✅ Success · Started 6:28 AM UTC · Completed 6:34 AM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.48 |
Superseded by updated review
…es the agent cannot write Resolve the Claude Code and codex hook interpreter and the hook PATH from directories the agent cannot write. Bootstrap now runs the launch's own python3 pin (envDataPin) in the sandbox and reads back the pinned interpreter and the trusted PATH in a single exec, instead of a plain `command -v python3` and the raw sandbox PATH, which can start with a directory the agent user owns (a virtualenv's bin). The absolute-path check and the Python 3.11 floor stay; Bootstrap fails with a clear error when no such python3 exists. Claude Code: hooks.json pins the trusted PATH for the hooks. codex: the launch already records FULLSEND_TRUSTED_PATH read-only before .env (inside envDataLoad, on the loader drop list); Run now exports it after .env and the hook adapter sets its children's PATH from it. codex itself keeps FULLSEND_CODEX_PATH. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
The codex hook adapter fell back to its inherited PATH when FULLSEND_TRUSTED_PATH was missing. The run command always exports it before codex starts, so a missing, empty or relative-entry value means the launch was not the one fullsend built: run_script now blocks before spawning, as it does for a missing digest map. Docs say the trusted PATH leaves out directories the agent user owns or can write. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
As root the trusted PATH was the raw launch PATH, so an empty or relative entry made the codex hook adapter block every call. Root launches now drop relative and empty entries and missing directories too, and skip only the ownership checks. Rename the adapter's PINNED_PATH_ENV to TRUSTED_PATH_ENV, and make the missing-digest test check its own refusal with the trusted PATH set. Assisted-by: Claude Signed-off-by: Wayne Sun <gsun@redhat.com>
0879f59 to
1d497d9
Compare
|
🤖 Finished Review · ✅ Success · Started 5:07 PM UTC · Completed 5:20 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.31 |
There was a problem hiding this comment.
Note: The following review comments could not be posted on the diff (GitHub returned 422) and are included here instead:
internal/runtime/codex_bootstrap.go(file-level): Line 281 ·
[low] injection-vuln
Hardening item, not an exploitable injection: the interpreter from hookPreflightInterpreter (now the readlink -f result of the launch pin) is joined unquoted into each hook command by codexHooksJSON (codex_config.go:465,494, unchanged by this PR). A protected interpreter path containing spaces or shell metacharacters would pass the quoted version check but misparse in the generated hook commands. The agent cannot control the path; only the image author does.
Suggested fix: Optionally shellQuote each argument in both codexHooksJSON command constructors, or reject unusual characters in hookPreflightInterpreter, and add a test with a space in the resolved interpreter path.
Superseded by updated review
dhshah13
left a comment
There was a problem hiding this comment.
Re-checked at 04acf48: both new tests fail with their fix removed (codex Bootstrap back to command -v python3; the floor call deleted), and go test ./internal/runtime/... ./internal/security/... ./internal/cli/... pass on Linux as non-root with dash. Docs, body and the breaking marker read right. Remaining LOWs tracked in #8631.
Retroactive record of the decision implemented in PR fullsend-ai#8605 (merged 2026-10-20): hook scripts resolve their interpreter and PATH only from directories the agent cannot write, using the launch loader's trusted-directory rules. Codex hooks fail closed without the trusted environment. Composes with ADR 0094's plugin trust model: the code that registers tools, the code that executes the agent, and the code that observes the agent now all resolve from agent-unwritable space. Renumbered from 0146 to 0150 after checking open PRs for in-flight ADR numbers (0146 = fullsend-ai#8679, 0147 = fullsend-ai#8694, 0148/0149 = fullsend-ai#8698) per the writing-adrs skill's step 1. Signed-off-by: James Tanner <jtanner@redhat.com>
Retroactive record of the decision implemented in PR fullsend-ai#8605 (merged 2026-10-20), extended by fullsend-ai#8589 (pi) and fullsend-ai#8633 (CLI binary pinning). Hook scripts resolve their interpreter and PATH only from directories the agent cannot write. Restructured per review feedback: Decision states the rules a safe hook setup must follow (trusted location, hooks see only trusted locations, one resolver, protected to the point of use, no hook no tool call, every runtime, no untrusted fallback, nothing protectable means fail closed), with a per-runtime conformance table. Factual corrections: the shared resolver is hookPreflightInterpreter, the Claude PATH is baked into hooks.json at Bootstrap (not exported at launch), Codex hook children use FULLSEND_TRUSTED_PATH (not FULLSEND_CODEX_PATH), and pi is included (same treatment in fullsend-ai#8589, pinned python3 not Node). Signed-off-by: James Tanner <jtanner@redhat.com>
Renumber the ADR 0150 -> 0152 (0146-0151 are claimed by open PRs fullsend-ai#8679, fullsend-ai#8694, fullsend-ai#8698, fullsend-ai#8702; fullsend-ai#8702 was filed first for 0150). Per waynesun09's reviews (first round 14:56, second round 18:29): - restructure the Decision as rules 1-10 with the conformance table separated out (moved to docs/contributing/runtime-implementation.md so it can track the implementation as the code changes, linked from Consequences) - add the Options section back per the ADR template (fail-open with warning, per-runtime resolvers, version-floor acceptance, hash-verification as primary mechanism — each rejected) - add rules 9 (executables, not just directories) and 10 (scope: settings sources fullsend-ai#8637, hooks.json integrity fullsend-ai#8261, plugin trust ADR 0094) - gaps against the rules are tracked in issues, not the ADR: fullsend-ai#8763 (per-file trust for every executable a hook runs) and fullsend-ai#8764 (paths that let a tool call through without a hook verdict), both filed by the reviewer; rule 8's root-launch exception stays as a one-sentence stated limit - fix the pre-fullsend-ai#8605 Codex wording: the PATH was restored for itself and its hook adapter's children - fix the architecture.md sentence to state the decision for all runtimes, not Codex only - factual corrections from the first round: the shared resolver is hookPreflightInterpreter; the boundary value is FULLSEND_TRUSTED_PATH; the pre-fullsend-ai#8605 gap was image-PATH agent-writable dirs; pi included (same treatment in fullsend-ai#8589, pinned python3 not Node) Per the dual-model review round (GLM 5.3 + DeepSeek V4.1 Flash): - breaking change names the runtimes (pi has no version preflight) - forge scope before Consequences, full forge list Signed-off-by: James Tanner <jtanner@redhat.com>
Renumber the ADR 0150 -> 0152 (0146-0151 are claimed by open PRs fullsend-ai#8679, fullsend-ai#8694, fullsend-ai#8698, fullsend-ai#8702; fullsend-ai#8702 was filed first for 0150). Per waynesun09's reviews (first round 14:56, second round 18:29): - restructure the Decision as rules 1-10 with the conformance table separated out (moved to docs/contributing/runtime-implementation.md so it can track the implementation as the code changes, linked from Consequences) - add the Options section back per the ADR template - add rules 9 (executables, not just directories) and 10 (scope) - gaps tracked in issues only: fullsend-ai#8763 and fullsend-ai#8764 linked bare, no implementation-state prose in the ADR - fold the root-launch case into rule 8 as an explicit scope precondition (accurate wording: the PATH still drops relative, empty, and missing entries as root; it cannot exclude agent-writable directories) instead of a contradictory Consequences 'limit' - cite the pre-fullsend-ai#8605 Codex behavior at the correct SHA (bbe0ab2^1 = 191d723), not unqualified line numbers - state the OpenCode exclusion in rule 6 and the conformance table (no ADR 0090 hook wiring until unbound-force#515) - fix the fullsend-ai#8589 chronology (merged earlier the same day as fullsend-ai#8605, not an extension after it) - fix the Options wording on hash verification (detects a substitution only at the next check; the ADR 0094 preflight detects at check time, not 'after the fact') - reference PR fullsend-ai#8261 explicitly as a PR - fix the architecture.md sentence to state the decision for all runtimes, not Codex only - factual corrections from the first round: the shared resolver is hookPreflightInterpreter; the boundary value is FULLSEND_TRUSTED_PATH; the pre-fullsend-ai#8605 gap was image-PATH agent-writable dirs; pi included (same treatment in fullsend-ai#8589, pinned python3 not Node) - update the conformance table Codex row to the post-fullsend-ai#8633 mechanism (envDataTrustedPin within codexBinaryPin) with the bbe0ab2 state noted Per the dual-model review round (GLM 5.3 + DeepSeek V4.1 Flash): - breaking change names the runtimes (pi has no version preflight) - forge scope before Consequences, full forge list Signed-off-by: James Tanner <jtanner@redhat.com>
Retroactive record of the decision implemented in PR fullsend-ai#8605 (merged 2026-10-20, merge commit bbe0ab2), with PR fullsend-ai#8589 (pi, merged earlier the same day) and extended by PR fullsend-ai#8633 (CLI binary pinning, issue fullsend-ai#8626): hook interpreters and hook PATH resolve only from directories the agent cannot write; hook settings are runner-held; startup is fail-closed on all runtimes carrying sandbox tool hooks. Decision stated as rules 1-10 with a per-runtime conformance table in docs/contributing/runtime-implementation.md (linked from Consequences so it tracks the implementation as code changes). Gaps against the rules are tracked in issues fullsend-ai#8763 and fullsend-ai#8764, both filed by the reviewer. The root-launch case is folded into rule 8 as an explicit scope precondition. OpenCode is excluded (no ADR 0090 hook wiring until unbound-force#515). Cross-references updated in the same PR per docs/contributing/adrs.md: ADR 0090 and ADR 0100 implementation notes, architecture.md runtime contract bullet, and the tool-call risk assessment problem doc (which previously stated pi hooks stay writable between iterations). Signed-off-by: James Tanner <jtanner@redhat.com>
Retroactive record of the decision implemented in PR fullsend-ai#8605 (merged 2026-10-20, merge commit bbe0ab2), with PR fullsend-ai#8589 (pi, merged earlier the same day) and extended by PR fullsend-ai#8633 (CLI binary pinning, issue fullsend-ai#8626): hook interpreters and hook PATH resolve only from directories the agent cannot write; hook settings are runner-held; startup is fail-closed on all runtimes carrying sandbox tool hooks. Decision stated as rules 1-10 with a per-runtime conformance table in docs/contributing/runtime-implementation.md (linked from Consequences so it tracks the implementation as code changes). Gaps against the rules are tracked in issues fullsend-ai#8763 and fullsend-ai#8764, both filed by the reviewer. The root-launch case is folded into rule 8 as an explicit scope precondition. OpenCode is excluded (no ADR 0090 hook wiring until unbound-force#515). Cross-references updated in the same PR per docs/contributing/adrs.md: ADR 0090 and ADR 0100 implementation notes, architecture.md runtime contract bullet, and the tool-call risk assessment problem doc (which previously stated pi hooks stay writable between iterations). Signed-off-by: James Tanner <jtanner@redhat.com>
Retroactive record of the decision implemented in PR fullsend-ai#8605 (merged 2026-10-20, merge commit bbe0ab2), with PR fullsend-ai#8589 (pi, merged earlier the same day) and extended by PR fullsend-ai#8633 (CLI binary pinning, issue fullsend-ai#8626): hook interpreters and hook PATH resolve only from directories the agent cannot write; hook settings are runner-held; startup is fail-closed on all runtimes carrying sandbox tool hooks. Decision stated as rules 1-10 with a per-runtime conformance table in docs/contributing/runtime-implementation.md (linked from Consequences so it tracks the implementation as code changes). Gaps against the rules are tracked in issues fullsend-ai#8763 and fullsend-ai#8764, both filed by the reviewer. The root-launch case is folded into rule 8 as an explicit scope precondition. OpenCode is excluded (no ADR 0090 hook wiring until unbound-force#515). Cross-references updated in the same PR per docs/contributing/adrs.md: ADR 0090 and ADR 0100 implementation notes, architecture.md runtime contract bullet, and the tool-call risk assessment problem doc (which previously stated pi hooks stay writable between iterations). Signed-off-by: James Tanner <jtanner@redhat.com>
Retroactive record of the decision implemented in PR fullsend-ai#8605 (merged 2026-10-20, merge commit bbe0ab2), with PR fullsend-ai#8589 (pi, merged earlier the same day) and extended by PR fullsend-ai#8633 (CLI binary pinning, issue fullsend-ai#8626): hook interpreters and hook PATH resolve only from directories the agent cannot write; hook settings are runner-held; startup is fail-closed on all runtimes carrying sandbox tool hooks. Decision stated as rules 1-10 with a per-runtime conformance table in docs/contributing/runtime-implementation.md (linked from Consequences so it tracks the implementation as code changes). Gaps against the rules are tracked in issues fullsend-ai#8763 and fullsend-ai#8764, both filed by the reviewer. The root-launch case is folded into rule 8 as an explicit scope precondition. OpenCode is excluded (no ADR 0090 hook wiring until unbound-force#515). Cross-references updated in the same PR per docs/contributing/adrs.md: ADR 0090 and ADR 0100 implementation notes, architecture.md runtime contract bullet, and the tool-call risk assessment problem doc (which previously stated pi hooks stay writable between iterations). Signed-off-by: James Tanner <tanner.jc@gmail.com>
Retroactive record of the decision implemented in PR fullsend-ai#8605 (merged 2026-10-20, merge commit bbe0ab2), with PR fullsend-ai#8589 (pi, merged earlier the same day) and extended by PR fullsend-ai#8633 (CLI binary pinning, issue fullsend-ai#8626): hook interpreters and hook PATH resolve only from directories the agent cannot write; hook settings are runner-held; startup is fail-closed on all runtimes carrying sandbox tool hooks. Decision stated as rules 1-10 with a per-runtime conformance table in docs/contributing/runtime-implementation.md (linked from Consequences so it tracks the implementation as code changes). Gaps against the rules are tracked in issues fullsend-ai#8763 and fullsend-ai#8764, both filed by the reviewer. The root-launch case is folded into rule 8 as an explicit scope precondition. OpenCode is excluded (no ADR 0090 hook wiring until unbound-force#515). Cross-references updated in the same PR per docs/contributing/adrs.md: ADR 0090 and ADR 0100 implementation notes, architecture.md runtime contract bullet, and the tool-call risk assessment problem doc (which previously stated pi hooks stay writable between iterations). Signed-off-by: James Tanner <tanner.jc@gmail.com>
Retroactive record of the decision implemented in PR fullsend-ai#8605 (merged 2026-10-20, merge commit bbe0ab2), with PR fullsend-ai#8589 (pi, merged earlier the same day) and extended by PR fullsend-ai#8633 (CLI binary pinning, issue fullsend-ai#8626): hook interpreters and hook PATH resolve only from directories the agent cannot write; hook settings are runner-held; startup is fail-closed on all runtimes carrying sandbox tool hooks. Decision stated as rules 1-10 with a per-runtime conformance table in docs/contributing/runtime-implementation.md (linked from Consequences so it tracks the implementation as code changes). Gaps against the rules are tracked in issues fullsend-ai#8763 and fullsend-ai#8764, both filed by the reviewer. The root-launch case is folded into rule 8 as an explicit scope precondition. OpenCode is excluded (no ADR 0090 hook wiring until unbound-force#515). Cross-references updated in the same PR per docs/contributing/adrs.md: ADR 0090 and ADR 0100 implementation notes, architecture.md runtime contract bullet, and the tool-call risk assessment problem doc (which previously stated pi hooks stay writable between iterations). Signed-off-by: James Tanner <tanner.jc@gmail.com>
Retroactive record of the decision implemented in PR fullsend-ai#8605 (merged 2026-10-20, merge commit bbe0ab2), with PR fullsend-ai#8589 (pi, merged earlier the same day) and extended by PR fullsend-ai#8633 (CLI binary pinning, issue fullsend-ai#8626): hook interpreters and hook PATH resolve only from directories the agent cannot write; hook settings are runner-held; startup is fail-closed on all runtimes carrying sandbox tool hooks. Decision stated as rules 1-10 with a per-runtime conformance table in docs/contributing/runtime-implementation.md (linked from Consequences so it tracks the implementation as code changes). Gaps against the rules are tracked in issues fullsend-ai#8763 and fullsend-ai#8764, both filed by the reviewer. The root-launch case is folded into rule 8 as an explicit scope precondition. OpenCode is excluded (no ADR 0090 hook wiring until unbound-force#515). Cross-references updated in the same PR per docs/contributing/adrs.md: ADR 0090 and ADR 0100 implementation notes, architecture.md runtime contract bullet, and the tool-call risk assessment problem doc (which previously stated pi hooks stay writable between iterations). Signed-off-by: James Tanner <tanner.jc@gmail.com>
Summary
Claude Code and codex hooks now get the same pinned interpreter and PATH the launch loader already uses (#8591), instead of a plain
command -v python3and the raw sandbox PATH.Related Issue
Follow-up to #8575 / #8591. The pi hook adapter gets the same treatment in #8589.
Changes
codex_bootstrap.go,hookPreflightInterpreter): runs the launch's own pin (envDataPin) in the sandbox and reads back the pinnedpython3andFULLSEND_TRUSTED_PATHin one exec. It replacescodexPreflightPythonand Claude'sclaudePreflightInterpreter. The absolute-path check and the Python 3.11 floor stay. Bootstrap fails with a clear error when no suchpython3exists.claude.go):hooks.jsonruns each hook asPATH='<trusted PATH>' <python> -E -s -B <script>(GenerateHooksConfigPinned).codex_run.go,fullsend-codex-hook.py): the run command exportsFULLSEND_TRUSTED_PATHafter.env. It is read-only and on the loader drop list, so.envcannot change it. The hook adapter sets its children's PATH from it. A missing, empty or relative-entry value blocks the call before anything is spawned, the same as a missing digest map. codex itself keepsFULLSEND_CODEX_PATH(restored as itsPATH, no longer exported).env_data.go,envDataTrustedPath): as root the trusted PATH still drops empty, relative and missing entries, which the hook adapters refuse. This is the shared fragment, so it also stops pi hooks blocking under root when PATH has an empty entry.runtime-implementation.mddescribes the hook interpreter and PATH contract.docs/runtimes/{claude,codex}.mdstate that with hooks on the protectedpython3must be 3.11 or newer.FULLSEND_TRUSTED_PATHline and the export).Breaking change
With sandbox hooks on, the
python3found in aPATHdirectory the sandbox user cannot write must be 3.11 or newer. The hook adapter's version floor used to run oncommand -v python3, so an image whose only 3.11+ interpreter is an agent-owned virtualenv over an older systempython3(RHEL/UBI 9 ships 3.9) passed Bootstrap. It now fails withhook interpreter ... needs at least 3.11. The fullsend sandbox image resolves/usr/bin/python3.12and is not affected.Testing
go test ./internal/runtime/... ./internal/security/... ./internal/cli/...pass as a non-root user on Linux (Debian,/bin/sh= dash) at the head, rebased on main after fix(#8577): run pi hook scripts with the python3 pinned before .env #8589. Before the rebase, the same suites and the pi extension's node tests passed on Fedora 44 (/bin/sh= bash 5).hooks.jsoncarries the trusted PATH. The codex adapter blocks without a trusted PATH, and its children get exactly that PATH. The codex launch exports it after.env. Bootstrap fails throughhookPreflightInterpreterwhen the pinned interpreter is below 3.11, and codexhooks.jsonstarts every command with the pinned interpreter. Each fails when its fix is removed.sandboxuser: the hook interpreter resolves to the image's root-ownedpython3, and the hook PATH leaves out the sandbox-owned venvbin.Checklist
!for breaking changes; see Breaking change).🤖 Generated with Claude Code