Repository navigation
Description
Codex manual logbook task T3 tracks this investigation. Task IDs are local to the provider logbook.
Purpose and status
Parent: #88. Investigation pending; local Codex task T3 tracks it.
The complete Codex evaluator needs trusted execution context before it can enforce Sage's command, path, file-write and workflow rules. Recovering the model's original command arguments does not establish the executor's resolved settings.
This issue tracks that dependency. Installed automatic Sage remains disabled. Manual multi-agent coordination remains the selected mode. The parent retains its full workflow and gated-autopilot acceptance criteria.
Existing evidence
The verified CLI 0.160.0 command route receives Bash with only tool_input.command at the pre-tool hook. The hook's cwd remains the session directory when an explicit command workdir selects another directory. The protected transcript can supply the original requested arguments, bound to the native actor, turn and call. It does not establish the resolved shell, selected environment or inherited permission defaults.
The pinned native implementation resolves workdir against the selected environment, which can be remote. Shell selection can discover an executable rather than execute the supplied shell path verbatim. Omitted settings can inherit environment or session defaults.
Sources:
- Current command-envelope contract.
- Pinned native command handler.
- Pinned native shell resolver.
- Official hook fields and failure behavior.
Required investigation
Identify a supported native producer and schema for the context used by the exact pending operation. Do not invent a producer, infer defaults from the policy process, or treat model-supplied fields as runtime authority.
Determine how the contract supplies or verifies:
- The selected executor/environment identity, including local or remote execution and the filesystem namespace.
- The effective working directory after resolution, including omitted, empty, relative and explicit workdir inputs.
- The effective shell type, executable and invocation/login behavior.
- The lookup settings needed by the policy, including PATH, HOME and CDPATH, and the treatment of shell startup state. Minimize disclosure; do not return credentials or a full environment dump.
- The resolved native permission/sandbox policy and any effective permission additions.
- The filesystem and checkout evidence needed for canonical paths, links, executable identity and current-branch checks in that same execution namespace.
Bind this evidence to the authenticated native root/session, actor, turn and tool-call identity. Establish when the snapshot is taken and how a change before execution invalidates an earlier decision. A request must not substitute another call's context.
Acceptance
- Document the supported native producer, versioned schema, timing and trust boundary with authoritative source references.
- Missing, invalid, stale, mismatched, unsupported or changed context refuses the protected operation. A successful policy result preserves Codex's native permission checks.
- Verify explicit and inherited settings through the actual native runtime. Include session-cwd versus command-workdir differences and shell resolution.
- Establish local and remote namespace behavior. Do not apply local filesystem evidence to a remote executor or silently narrow the product's supported scope.
- Test spoofed request fields, actor/turn/call mismatches, context changes and lost evidence. Compare the policy's evidence with actual execution where safe.
- Simulated model responses may make probes deterministic. Fabricated execution-context objects alone do not prove native support.
- Connect the verified context to the consumed production evaluator and shared core policies. Passing fixture callbacks or an unused helper do not complete that work.
- Preserve current Claude semantics, including its narrow plain-
ghexceptions, role rules and mode-off behavior. PR Lead honesty before step 4 (T289) #140 is merged. Keep active Claude-owned Lead build step 4: the sage:lead agent file and the docs (T181) #119, Mode switch: an off request a few words after the on phrase never turns the mode on (PR #104 follow-up) #105 and T198: Investigate merges and pushes that bypass the command tools #67 separate; recheck ownership before implementation. - Retain required filesystem sandbox protection and state the limits of static command analysis. Context metadata cannot prove arbitrary programs harmless.
Separate upstream dependency
openai/codex#41979 requests fail-closed handling when a pre-tool hook fails, times out or cannot deliver a valid result. It does not provide resolved execution context. Both dependencies matter before installed activation can be safe.
Record whether a separate upstream schema request is needed after this investigation. No upstream request or publication is authorized by this issue creation alone.
Released-source refresh: 0.163.0
The command handler still supplies only command in the Bash hook input. The hook request still uses host-local environment cwd with a turn-cwd fallback; the input schema does not supply the resolved execution tuple.
This checks the latest released source at this refresh, not a native 0.163.0 trial. Upstream #54427 remains open without a reply. Preserve refusal where required context is unavailable; no activation or default changes follow.
Source refresh: 0.166.0-alpha.6 (2026-11-06)
The outside-sandbox command guard still lacks effective execution evidence in the inspected official source, pinned to 4f093f2748667f3b0e6a07e3d4055121cbd3ce64. This is a source assessment, not an installed-runtime trial or a change to the separate local native prototype.
- PreToolUse exposes caller identity and requested tool input, without the selected execution sandbox.
- PermissionRequest also lacks the effective sandbox and tool-use ID. permission_mode reflects approval policy, not sandbox state.
- Correction to the earlier cache assumption: command permission hooks run before the approval-cache lookup. Cached approval can therefore reach the hook. This improves event coverage but does not expose execution state.
- The orchestrator selects the actual SandboxAttempt later. Skipped approval and retries also prevent PermissionRequest from covering every effective attempt.
- Negotiated MCP sandbox metadata describes its MCP call. It does not attest a separate native command attempt.
Keep the owner's original outside-sandbox-only scope. Do not infer effective execution from requested escalation, approval policy or an unrelated MCP call, and do not extend the rule to sandboxed commands without a product decision.
Upstream #54427 remains open. The required producer must bind effective context to the command and each execution attempt, covering fresh/cached/skipped approval, no-sandbox operation, retries and executor-managed execution. Then verify backend/source parity and harmless native enforcement cases. The inspected evidence does not establish that contract; it is not a claim that every possible API was excluded.
No production patch, installed update, activation or guard relaxation follows from this assessment. The owner-message autopilot cancellation gap remains separate.
Activity
erickb336 commentedon Oct 15, 2026
Released-source audit for Codex-local T3: neither reviewed release provides the complete runtime-resolved execution context through the pre-tool hook. This is source inspection, not native proof of a new capability.
Exact available evidence
{command: args.cmd}. The 0.160.0 handler uses the same command-only payload.Correction to the cwd description
The hook cwd is not necessarily the session cwd. tool_hook_cwd uses
local_environment_cwd()and falls back toturn.cwd. It deliberately retains a host-local fallback for remote environments. This is not the command's resolvedworkdir, which the handler resolves separately. The pinned 0.160.0 hook construction uses the same helper boundary.Why the other inspected surfaces do not close the gap
Nevermaps tobypassPermissions; several other policies map todefault. It is not an attestation of effective execution permissions.tool_use_id, and its Bash payload contains command and optional description. It does not provide the complete tuple for every call.Protected transcript recovery can authenticate the requested arguments for an exact call. It cannot turn those requests into proof of runtime-resolved values or fill omitted defaults. These are separate evidence boundaries.
Planning result
Retain refusal when required execution context is unavailable. Complete evaluation needs a verified upstream pre-execution interface or a separately approved execution boundary. Do not implement a synthetic contract or producer and treat it as native support.
No source changes, tests, native runs, upstream publication, or new tasks occurred in this audit. Native compatibility and complete evaluation remain unverified. All parent activation blockers remain in place.
erickb336 commentedon Oct 15, 2026
Published the approved upstream request: openai/codex#54427
It links the existing workdir and permission-context reports. The evidence is scoped to the 0.162.1 source audit; newly released 0.163.0 has not been tested in this investigation. This tracking issue remains open pending a supported contract and Sage integration.
erickb336 commentedon Oct 21, 2026
T26 diagnostic update: actual CLI 0.160.0 provides a possible controller-owned execution backend through standalone stdio exec-server. Safe local controls verified native filesystem and process sandbox behavior.
A permitted file write produced the expected bytes. A read-only replacement returned EPERM and left those bytes unchanged. Two fixed Node workers used explicit argv vectors without a shell: both reported macosSeatbelt; the read-only worker returned EPERM/exit 23 without changing the file, and the write-permitted worker exited 0 with the exact expected effect. Both process/closed events and service/stdio closure were observed. All fixtures were removed. No paid inference or external effect occurred.
Independent diagnostic code review found a final-evidence-read cleanup hazard in the reusable harness. New versioned harnesses repaired it; both normal controls and both actual-service injected-read-failure controls passed. Repair review is clean. Historical failed attempts and original source bytes remain retained.
This does not complete this issue. The supplied policies were synthetic fixture inputs, not the selected owner's native permission profile. A trusted adapter still needs to bind the actual argv/cwd/environment/permissions and native request identity, preserve approvals, and enforce role/task/gate/common ownership before effects. The service permits omitted sandbox contexts and must not become a generic model-facing RPC path. Model-host startup/tool isolation remains separate in #295; remote namespace and abrupt-loss recovery remain unverified. No production/default or Claude-active source changed.
erickb336 commentedon Oct 22, 2026
Progress: a local pinned native-host experiment now verifies an operation-specific file context path. It does not complete this issue or enable installed automatic Sage.
The native ToolExecutor receives executing-step ToolEnvironment data, including the executor filesystem, cwd and sandbox context. The experiment passes that original context to the same native filesystem adapter.
Four actual controlled native runs produced distinct results:
All four owned processes exited cleanly. Portable evidence checks passed 16/16. Independent diagnostic review R242 found no issues within that scope and checked all 15 retained evidence hashes. Each native arm ran once, using synthetic authentication and fixed simulated model responses. These are local experiment results; no production implementation is claimed.
Native source references at the tested revision:
The fixture controller decision is not native user approval or Sage task admission. The custom file message does not impersonate a native dynamic-tool request. Generic command/shell resolution, native approval orchestration, remote namespaces, changed authority, task/ownership gates and production integration remain unfinished. No default, installed setting or Claude-owned source changed. The next investigation concerns a supported command admission boundary that preserves native permissions and approvals.
erickb336 commentedon Oct 22, 2026
The next native-adapter design now has a source-backed boundary map and fresh diagnostic review. This is a reviewed requirements checkpoint, not an implemented interface or runtime completion.
The pinned source confirms that:
Independent review R244 found two medium gaps: resource identity across awaited admission, and mandatory policy inheritance across isolation. Revision2 now requires atomic protected resource consumption, deterministic alias/rename controls, separate immutable mandatory authority and empty/replacement-registry child/fork/resume controls. Fresh R245 review is clean for those corrected requirements. Both design findings are closed; their runtime capabilities remain unverified.
Seven artifacts and thirteen pinned source hashes matched. Nine source-location checks passed; these are static observations, not execution or complete coverage tests. The original checker mistake and prior review remain preserved.
Source references: native patch runtime, filesystem contract, isolated extension contract, thread construction.
The recommendation is a separate local native-adapter feasibility experiment before any production distribution choice. Preserve native sandbox/approval behavior and the full issue88 scope, including command/patch, remote, ownership, routes/gates and recovery requirements. No native-core patch, installed/default change or Claude-owned edit has started. This issue stays open.
erickb336 commentedon Oct 22, 2026
Local native admission prototype: independently reviewed (R246), with no new findings in its bounded scope.
This is a local research prototype against a pinned native source revision, not released Codex support or full Sage autopilot. No native fork was published, installed defaults changed, or production change merged for this unit. Synthetic fixture approval is not owner approval.
Still open: stable resource identity and atomic use, descendant/fork/resume qualification, commands and remote execution, interruption/revocation/recovery, shared Sage ownership and task gates, and release qualification. Source plumbing alone does not prove those contracts. The investigation remains open. All owned native fixture processes terminated; the reviewer started no background tasks.
erickb336 commentedon Oct 22, 2026
Native admission follow-up: two additional paths now have independently reviewed local fixture evidence.
The initial legacy subagent setup refused paginated history before a model turn. A separate no-turn-parent attempt had one metadata item but no durable history prefix, so it was excluded from fork-history evidence. Both failures are preserved. The corrected trials each ran once; review corrections did not trigger native reruns.
Qualified cases confirm both native sessions shut down, the owned process and streams ended, the listener closed, and temporary profiles were removed. No real model or shell command ran. No production Sage change or installed default changed, and no native fork was published.
This remains a local prototype against pinned native source. Manager-wide evaluator inheritance does not prove AgentControl scheduling or per-assignment authority. Cold resume, abrupt recovery, stable resource identity/atomic use, commands/remote execution, shared ownership, task gates and release qualification remain open. Next: native restart/resume evidence while preserving these requirements.
erickb336 commentedon Oct 22, 2026
Two bounded local controller checks now have recorded evidence.
All owned native processes, streams and fixture listeners ended. The native binaries and evidence are archived separately. No production Sage source, installed executable or default changed. This is local native research; no native fork was published and no claim of full autopilot or production qualification is made.
The constructor refusal is later than configuration and manager preparation. It is not complete pre-bootstrap integration isolation. The new guard has not yet received live internal/fork/resume qualification; previous binaries retain their prior limited evidence. Stable resource identity and atomic use, full native agent hierarchy, arbitrary commands/remote execution, common ownership, task gates, abrupt-loss settlement and release qualification remain open. Supplied evaluator presence alone does not authenticate a Sage task. The complete investigation route remains unfinished.
erickb336 commentedon Oct 22, 2026
Two further controller requirements now have independently reviewed local native evidence.
The first interruption observer had a patch-terminator typo. The native run had already stopped correctly. Corrected validation accepts its retained evidence without a native rerun; the original failed receipt and data remain preserved. The finding is fixed and closed after review.
All owned native processes, streams and fixture listeners ended. No runtime source changed in these two units; new fixture hosts use the reviewed local constructor guard. No production Sage source, installed default or executable changed, and no native fork was published. These results do not certify the full investigation route or production autopilot.
Still required: stable resource identity and atomic use, complete startup/integration isolation, per-assignment task/role/ownership/gate authority, full native hierarchy, commands/remote execution, abrupt-loss settlement and release qualification. Interruption while waiting does not prove rollback after an effect starts. Next, use an owned disposable fixture to observe a file replaced while admission waits, then design the executor-side remedy. Do not substitute a path recheck for a held resource capability.
erickb336 commentedon Oct 22, 2026
The local native prototype has one confirmed, unresolved target-binding failure.
A real patch reached the policy evaluator and waited. The controlled fixture renamed its target and created a replacement at the same path, with the same starting bytes. After the evaluator allowed the operation, the native patch changed the replacement. The original file remained unchanged under its new name. The protected file also remained unchanged.
This occurred inside the permitted disposable directory. It is not evidence of a sandbox escape. It shows that retaining the patch text and path does not retain the approved file through execution. The existing path-based executor cannot yet satisfy the proposed resource-binding requirement.
Independent diagnostic review R257 confirms the failure and the retained evidence. The finding F-T26-PATCH-TARGET-REBIND-1 remains open/fix. One new native trial and one retained, identical-binary control support the result. The 13 passing portable checks validate the observations; they do not establish a working fix. All owned processes, streams and the fixture listener ended. The failure files remain available for review.
The next step is an executor-side design that preserves native permissions and consumes the approved resource. It must cover parent paths, creation, deletion, move destinations and remote execution. A path recheck followed by another path lookup is insufficient. Existing read handles do not supply a prepared write capability. No remedy is implemented yet.
No production Sage source, installed executable, setting or default changed. No native fork was published. The shipped controller still exposes no model-turn operation. Complete startup isolation, common ownership, task/role/gate authority, full native hierarchy, abrupt-loss settlement and release qualification remain separate requirements. Claude's active documentation work is excluded.
erickb336 commentedon Nov 9, 2026
Closing as obsolete. The native Codex runtime and its policy evaluator were deleted in PR #467 (T732) and PR #468 (T914). Owner decision 2026-11-09.