You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI reports stale_bootstrap for healthy runtime inside Codex sandbox on macOS #12528
When the public orca CLI is invoked from a Codex sandbox running in an Orca-managed terminal on macOS, it can misclassify a healthy local Orca runtime as stale_bootstrap. Runtime-dependent commands then fail with runtime_unavailable. Running the identical commands outside the Codex sandbox succeeds immediately.
Environment
macOS 26.5.2 (arm64)
Orca app/CLI 1.4.165
The existing managed terminal environment contained ORCA_APP_VERSION=1.4.163, suggesting the terminal survived an app update to 1.4.165.
Orca was running with an active embedded-browser tab.
Reproduction
Start Orca and open an embedded-browser tab.
From a Codex sandbox in an Orca-managed terminal, run:
orca status --json
orca tab list --json
Run the same commands outside the Codex sandbox / with host-level command permission.
{
"ok": false,
"error": {
"code": "runtime_unavailable",
"message": "Could not connect to the running Orca app. Restart Orca and try again."
}
}
Control result outside the sandbox
The same orca status --json command reports the app as running and the runtime as ready; orca tab list --json successfully returns the active tab. Process inspection also confirms the Orca main process and helpers remain alive. This rules out an application crash.
Expected behavior
The CLI should connect to the healthy runtime from an Orca-managed Codex terminal without requiring broad host-level execution permission. If macOS process/signature inspection is unavailable in the sandbox, runtime discovery could validate the existing Unix socket/bootstrap through a safe handshake instead of classifying it as stale. At minimum, the error should identify the process-inspection permission problem instead of recommending an ineffective restart.
Notes
The issue may involve both sandboxed task_name_for_pid validation and a managed terminal surviving the 1.4.163 to 1.4.165 update. Restarting/reopening Orca did not change the sandboxed result; running the command outside the sandbox did.
Additional confirmation from #12453 / STA-3380 for @Jinwoo-H
The exact published v1.4.167 arm64 ZIP and DMG match their release hashes and pass deep/strict code-signing, Gatekeeper, notarization, and independent verification of all four Electron Helpers.
The reporter reproduced the distinction on macOS 26.5.2 with Orca 1.4.167: Terminal.app reports the runtime ready/reachable and the app valid/accepted, while the Codex sandbox produces task_name_for_pid: (os/kern) failure (5) and false signature failures.
The CLI status path catches a failed runtime RPC and then treats every process.kill(pid, 0) error—including sandbox EPERM—as “not running,” yielding stale_bootstrap. Runtime-dependent Computer Use commands fail through the same connection path before reaching the helper.
This rules out signing, packaging, and updater corruption and adds a second confirmed reproduction of the sandbox-access problem. The fix should preserve the sandbox boundary: ideally use a narrow, authorized route to the Orca runtime; at minimum, distinguish restricted access from a dead runtime and surface actionable guidance instead of recommending a restart.
Adding an independent macOS reproduction, since PR #13583 notes it has not been reproduced on macOS.
Environment
macOS, Darwin 25.5.0
Caller: Codex CLI with sandbox_mode = "workspace-write" (Codex sets CODEX_SANDBOX=seatbelt for commands it runs under the macOS seatbelt profile)
Orca app + daemon continuously running and reachable throughout; no crash reports, no restarts required to trigger
Reproduction
Deterministic: across 5 independent Codex sessions in a single day, spanning an app restart, everyorca CLI invocation from inside the sandbox returned stale_bootstrap. At the same moments, orca status --json from a normal (non-sandboxed) shell returned runtime.state: "ready".
One detail that may matter for the fix
The comment above describes the fallback as process.kill(pid, 0) returning EPERM. In our traces the failing probe surfaces a different signature — a Mach call via Electron, immediately preceding the stale_bootstrap JSON on stderr:
task_name_for_pid is denied by the seatbelt profile, and (os/kern) failure (5) is KERN_FAILURE, not a POSIX EPERM. So on macOS the liveness path appears to reach task_name_for_pid (Electron's codesign_util.cc) rather than — or in addition to — process.kill(pid, 0). If the fix in #13583 only splits EPERM/ESRCH on the process.kill path, this macOS route may still collapse "probe denied" into "process dead".
We have not instrumented the socket connect() itself, so we cannot confirm whether it returns EACCES/EPERM here — that part of #13583's open question is still open from our side too. What we can confirm is that the fallback probe fails with the Mach error above, and that the resulting state is stale_bootstrap rather than a permission-flavoured classification.
Why the classification matters downstream
We run agents inside Orca-managed worktrees, and this false positive is indistinguishable from a genuinely dead runtime at the call site. Our current mitigation is procedural — the agent stops calling orca on the first stale_bootstrap and falls back to file-based reporting, with a human verifying via a non-sandboxed shell. A distinct permission_denied / probe_failed classification (even without restoring connectivity, as #13583 scopes it) would be enough for callers to tell the two apart programmatically.
Happy to gather more data on macOS if it would help — e.g. capturing the connect() errno under the seatbelt profile, if you can suggest the least invasive way to instrument it.
A concrete security-sensitive use case for the narrow authorized route proposed here is a tracked read-only review worker.
The reviewer should be filesystem read-only, but its active Dispatch still requires lifecycle IPC to send heartbeat, ask, and exactly one worker_done. On macOS, launching Codex with its read-only sandbox prevents the public Orca CLI from reaching the healthy runtime, so the reviewer cannot settle its Dispatch. The only reliable local workaround has been --sandbox danger-full-access --ask-for-approval never plus a prompt-level prohibition on writes. That restores lifecycle reporting, but it grants much more host access than a reviewer needs and turns a technical boundary into a behavioral promise.
Suggested acceptance case for this issue:
Start a supervised Codex review Task with a live Dispatch capability.
Run the reviewer under Codex's read-only filesystem sandbox.
Permit only authenticated, Dispatch-scoped lifecycle operations needed by that worker (heartbeat, ask/resume, and worker_done; read-only dispatch inspection as needed).
Keep general Orca mutations, terminal control, and unrelated runtime access unavailable.
Verify the final worker_done atomically settles the Dispatch and Task without requiring danger-full-access.
The existing Dispatch capability already provides a useful authority boundary. If runtime discovery/process inspection cannot be made sandbox-compatible, a lifecycle-only helper/channel carrying that capability would still solve the reviewer case without exposing the full Orca CLI surface.
I do not think this warrants a duplicate issue: it is the least-privilege downstream requirement of the same sandbox/runtime-connectivity problem described here.
Measured the macOS errnos this issue turns on, and posted the full data on #13583 rather than duplicating it here: #13583 (comment)
Short version, from a Codex read-only sandbox (CODEX_SANDBOX=seatbelt, Codex CLI 0.147.0, Darwin 25.5.0), probed against a live healthy runtime with a non-sandboxed control run seconds apart:
Probe
In sandbox
Control
stat() on the endpoint
succeeds — mode 600, uid 501
same
process.kill(pid, 0)
EPERM
alive
net.connect()
EPERM, syscall: "connect"
connected
So the socket connect() is denied too, not only the pid probe — which is the point #13583 states it could not confirm on macOS.
One detail that separates this from the Windows case in #13539: there the sandbox runs as a distinct account, but here the sandboxed process is uid 501 and the socket is owned by uid 501, mode 600. Permissions are already correct and the connect is still refused, because seatbelt denies the syscall above the filesystem check. Anything that inspects endpoint ownership or mode to judge whether a denial is plausible will read macOS as healthy; the errno is the only signal.
The app was up with a visible window throughout. The worker's report is stranded in its TUI transcript; the CLI argument carrying it was never delivered anywhere.
This is the impact sentence from #13539 happening rather than being predicted:
A supervised worker can complete its task successfully but cannot deliver worker_done.
Three things this adds beyond the errno data
1. heartbeat is refused too, not just worker_done. The coordinator loses the liveness signal as well as the completion signal, so there is no observable difference between a worker that is working, a worker that is wedged, and a worker that has already finished. Any supervision policy built on heartbeats is silently inert inside the sandbox.
2. This is the default path, not an opt-in hardening. No --sandbox argument was passed anywhere; worker-start --agent codex produced it. The read-only review worker described in the comment above is one motivated case, but the exposure is every Codex worker on macOS, including ones whose authors never thought about sandboxing.
3. The misleading text has a second layer.src/cli/format.ts:88 appends a flat assertion to every runtime_unavailable:
if(errorinstanceofRuntimeClientError&&error.code==='runtime_unavailable'){return`${message}\nOrca is not running. Run 'orca open' first.`}
So the denial arrives as advice to restart, followed by a categorical claim that the app is not running. The agent treated that claim as ground truth and stopped — reasonably, since nothing in the output hints at a permission problem. The first layer loses the errno; the second turns the loss into a false statement of fact.
I also nearly hung on it from the other side: my coordinator was sitting in a 9-minute check --wait for a message that could never arrive.
Traced the branch rather than assuming. With that PR, transport.ts raises runtime_permission_denied, so the format.ts:87 check for runtime_unavailable no longer matches; there are no nextSteps on the error, and formatRawCliError falls through to return message at format.ts:112. The worker would receive the permission-denied text with the endpoint named, and not the "Orca is not running" line.
That is the difference between a worker that stops and a worker that can act: the sandbox is dropped for that one call, or the report is routed another way.
Provenance and redaction
Environment: macOS, Darwin 25.5.0, Apple Silicon; Codex CLI 0.147.0; unix domain socket transport.
The CLI is a fork build. src/cli/runtime/status.ts, transport.ts and types.ts are byte-identical to upstream main; the only fork change in src/cli/format.ts is a brand-string wrapper around formatRawCliError, leaving the branch logic and the literals above untouched. Quoted messages are shown with upstream product naming; the observed text differed only by that substitution.
Local run/task/dispatch/terminal identifiers and the injected dispatch capability token are omitted deliberately.
Happy to re-run this against a build of #13583 if that would be useful before merge.
Additional sanitized confirmation on a newer local release:
macOS on Apple Silicon; Orca 1.4.197; Codex CLI 0.153.2.
Orca created a supervised Codex worker using the workspace-write sandbox. The launch receipt selected gpt-5.6-luna at low effort.
Control: in a normal Orca terminal, orca status --json reported the same local app running and runtime ready/reachable.
In the sandboxed worker, orca orchestration ask and the attempted worker_done both failed with the CLI’s “Could not connect to the running Orca app” response. The coordinator received no request or completion, and no fixture file was created.
Orca still displayed the isolated worktree and worker as Working in the sidebar/Agent Dashboard. That visibility did not establish lifecycle delivery; the desktop Tasks surface did not show the local orchestration Task ID.
This confirms the defect affects a coordinator-mediated approval and handoff workflow, not only a status probe. No product files were changed. The local evidence is retained privately; task IDs, dispatch data, capabilities, local paths, account identity, and raw logs are deliberately omitted.
Expected behavior: a sandboxed supervised worker should be able to use a narrow, dispatch-scoped Orca lifecycle path for ask, heartbeat, and one worker_done, without needing broad host-level execution permission. Until that exists, a visible worker or terminal transcript must not be treated as a delivered handoff.
Sanitized Linux confirmation on Orca 1.4.200: a Codex workspace-write worker cannot deliver lifecycle messages even though the existing host runtime is healthy.
Same user/home/cwd and same live metadata: host Unix connect and PID probe succeed; restricted Unix connect returns EPERM (1), PID probe ESRCH (3), and CLI reports stale_bootstrap. A real dispatched worker executed its task but its check/worker_done RPC failed. A fresh command-scoped socket probe also rejects AF_INET socket creation with EPERM. No permissions, proxy service or global setting were changed.
At source f352b6b, src/cli/runtime/transport.ts selects only unix/named-pipe for local metadata; client.ts chooses WebSocket only through explicit remote pairing/environment. Merely advertising an existing WebSocket endpoint is therefore not a supported automatic local fallback, and the existing network restriction still applies. Please distinguish PID/transport denial from stale/dead runtime. PR #13583 addresses diagnostic classification; that alone is not a dispatch-scoped transport repair.
A separate already-authorized Windows/WSL worker completed through the native federation relay: exact Task/Dispatch result, Run-home confirmation, ack, captured transcript and release, without changing settings. That is a usable supervised alternative, not evidence that the restricted Linux path is repaired. Request remains a narrow supported lifecycle route under the existing worker policy, or an explicit unsupported-capability diagnosis. No local IDs, account details, capabilities, endpoints or private logs are included here.
Runtime-dependent Orca commands from inside that worker fail with runtime_unavailable / Could not connect to the running Orca app.
Additional orchestration impact:
The Codex worker completed its read-only review successfully and the coordinator
could read the completed transcript/output through orca orchestration worker-read.
However, the worker could not deliver its worker_done message from inside the
sandbox.
Coordinator-side worker-show therefore remained inconsistent:
worker activity: done
dispatch status: dispatched
outcome: in_progress
liveness: live
terminal: connected/writable
The review result itself was complete; only communication with the Orca runtime
from inside the Codex sandbox failed.
Retrying the same worker_done after confirming Orca was healthy from the
coordinator side failed again. Running orca open from inside the worker did not
restore connectivity.
Relevant environment fact from the Codex session:
CODEX_SANDBOX_NETWORK_DISABLED=1
This appears to be the same sandbox/runtime-discovery issue, still reproducible
with Orca 1.4.200 + Codex CLI 0.154.0.
Happy to provide a minimal reproduction or additional diagnostics if useful.
Activity
brennanb2025 commentedon Aug 5, 2026
Additional confirmation from #12453 / STA-3380 for @Jinwoo-H
task_name_for_pid: (os/kern) failure (5)and false signature failures.process.kill(pid, 0)error—including sandboxEPERM—as “not running,” yieldingstale_bootstrap. Runtime-dependent Computer Use commands fail through the same connection path before reaching the helper.This rules out signing, packaging, and updater corruption and adds a second confirmed reproduction of the sandbox-access problem. The fix should preserve the sandbox boundary: ideally use a narrow, authorized route to the Orca runtime; at minimum, distinguish restricted access from a dead runtime and surface actionable guidance instead of recommending a restart.
farrrr commentedon Aug 10, 2026
Adding an independent macOS reproduction, since PR #13583 notes it has not been reproduced on macOS.
Environment
sandbox_mode = "workspace-write"(Codex setsCODEX_SANDBOX=seatbeltfor commands it runs under the macOS seatbelt profile)Reproduction
Deterministic: across 5 independent Codex sessions in a single day, spanning an app restart, every
orcaCLI invocation from inside the sandbox returnedstale_bootstrap. At the same moments,orca status --jsonfrom a normal (non-sandboxed) shell returnedruntime.state: "ready".One detail that may matter for the fix
The comment above describes the fallback as
process.kill(pid, 0)returningEPERM. In our traces the failing probe surfaces a different signature — a Mach call via Electron, immediately preceding thestale_bootstrapJSON on stderr:task_name_for_pidis denied by the seatbelt profile, and(os/kern) failure (5)isKERN_FAILURE, not a POSIXEPERM. So on macOS the liveness path appears to reachtask_name_for_pid(Electron'scodesign_util.cc) rather than — or in addition to —process.kill(pid, 0). If the fix in #13583 only splitsEPERM/ESRCHon theprocess.killpath, this macOS route may still collapse "probe denied" into "process dead".We have not instrumented the socket
connect()itself, so we cannot confirm whether it returnsEACCES/EPERMhere — that part of #13583's open question is still open from our side too. What we can confirm is that the fallback probe fails with the Mach error above, and that the resulting state isstale_bootstraprather than a permission-flavoured classification.Why the classification matters downstream
We run agents inside Orca-managed worktrees, and this false positive is indistinguishable from a genuinely dead runtime at the call site. Our current mitigation is procedural — the agent stops calling
orcaon the firststale_bootstrapand falls back to file-based reporting, with a human verifying via a non-sandboxed shell. A distinctpermission_denied/probe_failedclassification (even without restoring connectivity, as #13583 scopes it) would be enough for callers to tell the two apart programmatically.Happy to gather more data on macOS if it would help — e.g. capturing the
connect()errno under the seatbelt profile, if you can suggest the least invasive way to instrument it.guanbear commentedon Aug 14, 2026
A concrete security-sensitive use case for the narrow authorized route proposed here is a tracked read-only review worker.
The reviewer should be filesystem read-only, but its active Dispatch still requires lifecycle IPC to send
heartbeat,ask, and exactly oneworker_done. On macOS, launching Codex with its read-only sandbox prevents the public Orca CLI from reaching the healthy runtime, so the reviewer cannot settle its Dispatch. The only reliable local workaround has been--sandbox danger-full-access --ask-for-approval neverplus a prompt-level prohibition on writes. That restores lifecycle reporting, but it grants much more host access than a reviewer needs and turns a technical boundary into a behavioral promise.Suggested acceptance case for this issue:
heartbeat,ask/resume, andworker_done; read-only dispatch inspection as needed).worker_doneatomically settles the Dispatch and Task without requiringdanger-full-access.The existing Dispatch capability already provides a useful authority boundary. If runtime discovery/process inspection cannot be made sandbox-compatible, a lifecycle-only helper/channel carrying that capability would still solve the reviewer case without exposing the full Orca CLI surface.
I do not think this warrants a duplicate issue: it is the least-privilege downstream requirement of the same sandbox/runtime-connectivity problem described here.
tonite31 commentedon Aug 15, 2026
Measured the macOS errnos this issue turns on, and posted the full data on #13583 rather than duplicating it here: #13583 (comment)
Short version, from a Codex
read-onlysandbox (CODEX_SANDBOX=seatbelt, Codex CLI 0.147.0, Darwin 25.5.0), probed against a live healthy runtime with a non-sandboxed control run seconds apart:stat()on the endpoint600, uid501process.kill(pid, 0)EPERMnet.connect()EPERM,syscall: "connect"So the socket
connect()is denied too, not only the pid probe — which is the point #13583 states it could not confirm on macOS.One detail that separates this from the Windows case in #13539: there the sandbox runs as a distinct account, but here the sandboxed process is uid 501 and the socket is owned by uid 501, mode 600. Permissions are already correct and the connect is still refused, because seatbelt denies the syscall above the filesystem check. Anything that inspects endpoint ownership or mode to judge whether a denial is plausible will read macOS as healthy; the errno is the only signal.
tonite31 commentedon Aug 15, 2026
End-to-end reproduction: a supervised Codex worker finished its task and could not report it
Follow-up to my errno measurement above. This time it happened for real, in the orchestration path, with a task I actually wanted done — not a probe.
What I ran
An ordinary supervised worker, no sandbox flags of any kind:
Then the normal coordinator wait:
What happened
heartbeatworker_donedispatchedWhat the worker saw on both calls:
What
orca status --jsonreturned from a non-sandboxed shell at the same moment:The app was up with a visible window throughout. The worker's report is stranded in its TUI transcript; the CLI argument carrying it was never delivered anywhere.
This is the impact sentence from #13539 happening rather than being predicted:
Three things this adds beyond the errno data
1.
heartbeatis refused too, not justworker_done. The coordinator loses the liveness signal as well as the completion signal, so there is no observable difference between a worker that is working, a worker that is wedged, and a worker that has already finished. Any supervision policy built on heartbeats is silently inert inside the sandbox.2. This is the default path, not an opt-in hardening. No
--sandboxargument was passed anywhere;worker-start --agent codexproduced it. The read-only review worker described in the comment above is one motivated case, but the exposure is every Codex worker on macOS, including ones whose authors never thought about sandboxing.3. The misleading text has a second layer.
src/cli/format.ts:88appends a flat assertion to everyruntime_unavailable:So the denial arrives as advice to restart, followed by a categorical claim that the app is not running. The agent treated that claim as ground truth and stopped — reasonably, since nothing in the output hints at a permission problem. The first layer loses the errno; the second turns the loss into a false statement of fact.
I also nearly hung on it from the other side: my coordinator was sitting in a 9-minute
check --waitfor a message that could never arrive.#13583 clears both layers
Traced the branch rather than assuming. With that PR,
transport.tsraisesruntime_permission_denied, so theformat.ts:87check forruntime_unavailableno longer matches; there are nonextStepson the error, andformatRawCliErrorfalls through toreturn messageatformat.ts:112. The worker would receive the permission-denied text with the endpoint named, and not the "Orca is not running" line.That is the difference between a worker that stops and a worker that can act: the sandbox is dropped for that one call, or the report is routed another way.
Provenance and redaction
src/cli/runtime/status.ts,transport.tsandtypes.tsare byte-identical to upstreammain; the only fork change insrc/cli/format.tsis a brand-string wrapper aroundformatRawCliError, leaving the branch logic and the literals above untouched. Quoted messages are shown with upstream product naming; the observed text differed only by that substitution.Happy to re-run this against a build of #13583 if that would be useful before merge.
alxledesma commentedon Sep 7, 2026
Additional sanitized confirmation on a newer local release:
workspace-writesandbox. The launch receipt selectedgpt-5.6-lunaat low effort.orca status --jsonreported the same local app running and runtimeready/reachable.orca orchestration askand the attemptedworker_doneboth failed with the CLI’s “Could not connect to the running Orca app” response. The coordinator received no request or completion, and no fixture file was created.This confirms the defect affects a coordinator-mediated approval and handoff workflow, not only a status probe. No product files were changed. The local evidence is retained privately; task IDs, dispatch data, capabilities, local paths, account identity, and raw logs are deliberately omitted.
Expected behavior: a sandboxed supervised worker should be able to use a narrow, dispatch-scoped Orca lifecycle path for
ask, heartbeat, and oneworker_done, without needing broad host-level execution permission. Until that exists, a visible worker or terminal transcript must not be treated as a delivered handoff.tinmanlab commentedon Sep 12, 2026
Sanitized Linux confirmation on Orca 1.4.200: a Codex workspace-write worker cannot deliver lifecycle messages even though the existing host runtime is healthy.
Same user/home/cwd and same live metadata: host Unix connect and PID probe succeed; restricted Unix connect returns EPERM (1), PID probe ESRCH (3), and CLI reports stale_bootstrap. A real dispatched worker executed its task but its check/worker_done RPC failed. A fresh command-scoped socket probe also rejects AF_INET socket creation with EPERM. No permissions, proxy service or global setting were changed.
At source f352b6b, src/cli/runtime/transport.ts selects only unix/named-pipe for local metadata; client.ts chooses WebSocket only through explicit remote pairing/environment. Merely advertising an existing WebSocket endpoint is therefore not a supported automatic local fallback, and the existing network restriction still applies. Please distinguish PID/transport denial from stale/dead runtime. PR #13583 addresses diagnostic classification; that alone is not a dispatch-scoped transport repair.
A separate already-authorized Windows/WSL worker completed through the native federation relay: exact Task/Dispatch result, Run-home confirmation, ack, captured transcript and release, without changing settings. That is a usable supervised alternative, not evidence that the restricted Linux path is repaired. Request remains a narrow supported lifecycle route under the existing worker policy, or an explicit unsupported-capability diagnosis. No local IDs, account details, capabilities, endpoints or private logs are included here.
domvox commentedon Sep 14, 2026
Still reproducible on newer versions.
Environment:
Coordinator/host shell:
orca status --json
→ app.running: true
→ runtime.state: ready
→ runtime.reachable: true
→ connectionState: connected
→ appVersion: 1.4.200
Inside the supervised Codex worker sandbox:
orca status --json
prints:
[ERROR:electron/shell/common/mac/codesign_util.cc:79]
task_name_for_pid: (os/kern) failure (5)
and reports:
→ app.running: false
→ runtime.state: stale_bootstrap
→ runtime.reachable: false
→ connectionState: disconnected
→ runtimeId: null
Runtime-dependent Orca commands from inside that worker fail with
runtime_unavailable/Could not connect to the running Orca app.Additional orchestration impact:
The Codex worker completed its read-only review successfully and the coordinator
could read the completed transcript/output through
orca orchestration worker-read.However, the worker could not deliver its
worker_donemessage from inside thesandbox.
Coordinator-side
worker-showtherefore remained inconsistent:The review result itself was complete; only communication with the Orca runtime
from inside the Codex sandbox failed.
Retrying the same
worker_doneafter confirming Orca was healthy from thecoordinator side failed again. Running
orca openfrom inside the worker did notrestore connectivity.
Relevant environment fact from the Codex session:
This appears to be the same sandbox/runtime-discovery issue, still reproducible
with Orca 1.4.200 + Codex CLI 0.154.0.
Happy to provide a minimal reproduction or additional diagnostics if useful.