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
Open pstack fail to run grok on a Claude code cloud session #56
Grok lanes refuse to start on Claude Code on the web: the cloud kernel has no Landlock, and the runner only passes Landlock-backed sandbox profiles
Summary
Open Pstack launches every Grok lane with --sandbox read-only (read-only lanes) or --sandbox workspace (isolated-write lanes). Grok Build 1.0.13 enforces those profiles with Landlock on Linux and refuses to start when the kernel cannot apply them. The Claude Code on the web VM kernel is built without Landlock, so every Grok lane exits in about two seconds with child-failed (runner exit code 70). The runner's preflight (grok models) passes, so the failure is only visible at lane start.
Claude and Codex lanes on the same session are unaffected.
Environment
Claude Code on the web (cloud session), Firecracker VM, kernel 6.18.44-fc-v24
Kernel config: CONFIG_SECURITY_LANDLOCK is not set; CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,apparmor,bpf"; /sys/kernel/security/lsm does not exist
Grok exits 1 after about 2 s with one line on stderr:
error: could not apply the 'read-only' sandbox profile; see the warning above for the cause. Refusing to start with its protections missing.
The runner receipt:
preflight.status: passed (authenticated; model grok-4.6 available)
exitCode: 1
status: child-failed
elapsedMs: 1884
error.message: child exited with status 1
Runner exit code 70.
The same happens for --mode isolated-write (--sandbox workspace, --permission-mode acceptEdits, runner exit 70 after 2.1 s), for --sandbox strict, and for the GROK_SANDBOX=read-only environment form. Grok alone reproduces it without the runner:
On the cloud kernel this prints errno=Function not implemented. On a kernel with Landlock it prints the ABI version.
If a grok wrapper is on PATH (see the workaround below), put the real binary first before reproducing: PATH=/root/.local/bin:$PATH.
Expected result
Either the runner detects a host that cannot apply the profile in preflight and reports it as such, in two seconds, with a receipt status that names the cause; or the runner lets the caller choose the Grok sandbox profile per host; or the docs say that Grok lanes need a Linux kernel with Landlock plus bubblewrap, so Claude Code on the web is a known unsupported host.
Verified local workaround
A wrapper first on PATH, named grok, that rewrites --sandbox read-only and --sandbox workspace to --sandbox devbox when the probe above says Landlock is absent, and is a no-op otherwise. Through it, read-only and isolated-write lanes complete with status: complete, reportedModel: grok-4.6-build, modelVerified: true. The wrapper also needs the two permission changes from issue #34 (see below), because devbox fences nothing and Grok then asks.
This is a workaround, not a proposed fix: devbox runs the lane unconfined.
Additional observations
bubblewrap comes first. On the stock cloud image the first refusal is a different one, in about 1.6 s, and grok models still passes:
error: this sandbox could not enforce its deny list on Linux: bwrap exec failed: No such file or directory (os error 2). Install bubblewrap with `apt install -y bubblewrap`. Refusing to start with denied paths unprotected.
After apt install -y bubblewrap the Landlock refusal above appears. So a Grok lane needs two host prerequisites that the runner's preflight does not check.
Grok's docs disagree with its behavior.~/.grok/docs/user-guide/18-sandbox.md says "If the sandbox cannot be applied (e.g., unsupported kernel, missing entitlements), Grok logs a warning and continues without enforcement. The exception is an explicitly-requested custom profile". The built-in read-only, workspace and strict profiles refuse instead. The same file also says "Profiles that require it refuse to start if the kernel policy cannot be applied". The error text says "see the warning above", and no warning is printed in headless mode; --debug prints nothing more, and --debug-file <f> does not create the file.
Once Grok starts on devbox, headless permission prompts cancel the lane. This is issue Grok isolated-write lanes cancel headless edit permissions #34, and my trail matches it exactly: an isolated-write lane's first search_replace (creating a new file inside the lane's cwd) logged permission_requested, permission_resolved decision=cancelled wait_ms=0, turn_ended cancellation_category=permission_cancelled; runner status malformed-output, exit 65, after 12.9 minutes of work. The read-only variant is not in Grok isolated-write lanes cancel headless edit permissions #34: in --permission-mode plan, a shell command that writes a file (cat > report.md << 'EOF') logged the same three lines with tool_name=run_terminal_command and wait_ms=3, and the lane died after 7 minutes. A built-in read-only command (git log -1 --oneline) did not prompt.
What did not help:--debug, --debug-file, and the GROK_SANDBOX environment form, all with the same refusal.
Factory plan review: revise (operator review of the plan dated 2026-09-11, card revision 14)
The investigation is sound: the bug is still present on main. The runner has no handling for a host without Landlock or bwrap, and it reports child-failed/70 after grok models passes. The plan cannot be approved yet, for these reasons:
Post the complete plan in the thread. The last round wrote the plan to a sandbox file (.mastracode/plans/issue-56-grok-cloud-sandbox.md) and posted only a short summary. The next round must post the full plan as its final message, using every section of the planning template: Goal, Scope (In/Out), Kind, Findings, Phases, Expected files, Risks, Assumptions, Open questions, Acceptance evidence.
List the receipt-contract choice under Open questions; don't decide it in the plan. The previous plan bumped the receipt schemaVersion from 1 to 2 on its own. The maintainer should choose between these three options:
(a) A new unavailable-sandbox status with exit code 69 and a schema bump.
(b) The same status without a schema bump.
(c) A docs-only change stating that Claude Code cloud sessions without Landlock or bwrap are unsupported for Grok lanes.
Maintainer decision (2026-10-01): option (c). Document that Claude Code cloud sessions without Landlock or bwrap can't run Grok lanes. When the runner hits that refusal, the existing child-failed result names the cause. There's no new receipt status and no schema bump. Never substitute --sandbox devbox or off. Prior art: #82.
Plan reviewed: the plan thread posted 2026-09-23 against de67e6b.
Planner model:gpt-5.6-sol, from the plan session's message metadata.
Reviewer model: Claude Opus 5.5, reviewing in a separate context.
Rubric: the factory-adjudicate plan checklist.
Why revise
Conflicts with a settled decision. On 2026-10-01 the maintainer chose option (c): documentation only. The plan still carries a code path.
The plan says "If the operator selects a code option, narrowly recognize Grok model-stage refusal…".
Its Kind section treats the receipt contract as an open choice.
What passes: a docs-only plan with no runner, receipt, status or schema change. The existing child-failed result already carries Grok's own refusal text in its evidence, and the docs point readers to it.
What passes: drop Phase 1's ordering gate. Base the change on current main (be66d68) and remove the references to those PRs.
What the revised plan should contain
Scope. Add a host-prerequisite note to plugins/pstack/skills/poteto-mode/references/provider-dispatch.md, next to the existing parent-sandbox paragraph at line 72. The note says:
Grok's read-only and workspace sandboxes need Landlock, plus bubblewrap on Linux.
Hosts without them cannot run Grok lanes. Claude Code cloud sessions are one example.
On such a host the lane fails as child-failed, and the receipt evidence contains Grok's refusal text.
Open Pstack never substitutes devbox or off.
Setup. Add a matching one-line note to setup-pstack so a failed Grok probe on such a host points to that section.
Wording. Keep the wording generic so it holds for any host that lacks these kernel features, not only one vendor's VM.
Files. The plan lists the expected files and their upstream status. provider-dispatch.md is a port-owned file. Check UPSTREAM.md before editing.
Build conditions
No change under scripts/runner/.
The static invariants and plugin validation pass.
Live gate: install the exact candidate and confirm from a Claude Code parent and a Codex parent that the installed provider-dispatch.md and setup-pstack show the new text. The change is docs only, so no Landlock-less host is needed.
Plan reviewed: the docs-only plan posted after the revise verdict of 2026-10-04.
Planner model:gpt-6.1-sol, from the plan session's message metadata.
Reviewer model: Claude Opus 5.5, reviewing in a separate context.
Rubric: the factory-adjudicate plan checklist.
Why approve
Every gate passes, and Open questions is None.
The plan follows the maintainer's option (c): documentation only. It has no runner, receipt or schema change, and its scope proof (git diff --exit-code … scripts/runner/) enforces that.
The anchors hold on main (be66d68):
provider-dispatch.md:72 is the parent-sandbox paragraph.
provider-dispatch.md:83 is the Grok auto-mode paragraph, which the plan preserves.
setup-pstack/SKILL.md contains the probe section.
The wording risks have early checks:
Prerequisites are scoped to Linux.
Claude Code cloud sessions are named as an example of an affected host, not all cloud sessions.
Keep the setup cross-reference to one sentence. Check that the relative anchor resolves in the installed tree, not only in the source checkout.
Before opening the PR, run the CI-equivalent checks in a Bun-enabled environment and report each exit status. If the build host lacks Bun or the harness CLIs, fix the host. Don't skip the checks.
Activity
nirdrang commentedon Sep 9, 2026
Grok lanes refuse to start on Claude Code on the web: the cloud kernel has no Landlock, and the runner only passes Landlock-backed sandbox profiles
Summary
Open Pstack launches every Grok lane with
--sandbox read-only(read-only lanes) or--sandbox workspace(isolated-write lanes). Grok Build 1.0.13 enforces those profiles with Landlock on Linux and refuses to start when the kernel cannot apply them. The Claude Code on the web VM kernel is built without Landlock, so every Grok lane exits in about two seconds withchild-failed(runner exit code 70). The runner's preflight (grok models) passes, so the failure is only visible at lane start.Claude and Codex lanes on the same session are unaffected.
Environment
6.18.44-fc-v24CONFIG_SECURITY_LANDLOCK is not set;CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,apparmor,bpf";/sys/kernel/security/lsmdoes not existlandlock_create_ruleset(NULL, 0, LANDLOCK_CREATE_RULESET_VERSION)returns-1,errno 38 ENOSYSmainatc8481f7builds the same Grok flags5e9a58528b76, static binarygrok-4.6listed bygrok modelsReproduction
Every step below was re-run on 2026-09-09 and failed as described.
Run
pstack-runnerwith these relevant options:Use any prompt; a one-line prompt is enough.
The runner builds this Grok command (from the receipt's
argv):Grok exits 1 after about 2 s with one line on stderr:
The runner receipt:
Runner exit code 70.
The same happens for
--mode isolated-write(--sandbox workspace,--permission-mode acceptEdits, runner exit 70 after 2.1 s), for--sandbox strict, and for theGROK_SANDBOX=read-onlyenvironment form. Grok alone reproduces it without the runner:Only
--sandbox offand--sandbox devboxstart on this kernel; both answer the prompt with exit 0.To check a host before running a lane:
On the cloud kernel this prints
errno=Function not implemented. On a kernel with Landlock it prints the ABI version.If a grok wrapper is on PATH (see the workaround below), put the real binary first before reproducing:
PATH=/root/.local/bin:$PATH.Expected result
Either the runner detects a host that cannot apply the profile in preflight and reports it as such, in two seconds, with a receipt status that names the cause; or the runner lets the caller choose the Grok sandbox profile per host; or the docs say that Grok lanes need a Linux kernel with Landlock plus bubblewrap, so Claude Code on the web is a known unsupported host.
Verified local workaround
A wrapper first on
PATH, namedgrok, that rewrites--sandbox read-onlyand--sandbox workspaceto--sandbox devboxwhen the probe above says Landlock is absent, and is a no-op otherwise. Through it, read-only and isolated-write lanes complete withstatus: complete,reportedModel: grok-4.6-build,modelVerified: true. The wrapper also needs the two permission changes from issue #34 (see below), becausedevboxfences nothing and Grok then asks.This is a workaround, not a proposed fix:
devboxruns the lane unconfined.Additional observations
bubblewrap comes first. On the stock cloud image the first refusal is a different one, in about 1.6 s, and
grok modelsstill passes:After
apt install -y bubblewrapthe Landlock refusal above appears. So a Grok lane needs two host prerequisites that the runner's preflight does not check.Grok's docs disagree with its behavior.
~/.grok/docs/user-guide/18-sandbox.mdsays "If the sandbox cannot be applied (e.g., unsupported kernel, missing entitlements), Grok logs a warning and continues without enforcement. The exception is an explicitly-requested custom profile". The built-inread-only,workspaceandstrictprofiles refuse instead. The same file also says "Profiles that require it refuse to start if the kernel policy cannot be applied". The error text says "see the warning above", and no warning is printed in headless mode;--debugprints nothing more, and--debug-file <f>does not create the file.Once Grok starts on
devbox, headless permission prompts cancel the lane. This is issue Grok isolated-write lanes cancel headless edit permissions #34, and my trail matches it exactly: an isolated-write lane's firstsearch_replace(creating a new file inside the lane's cwd) loggedpermission_requested,permission_resolved decision=cancelled wait_ms=0,turn_ended cancellation_category=permission_cancelled; runner statusmalformed-output, exit 65, after 12.9 minutes of work. The read-only variant is not in Grok isolated-write lanes cancel headless edit permissions #34: in--permission-mode plan, a shell command that writes a file (cat > report.md << 'EOF') logged the same three lines withtool_name=run_terminal_commandandwait_ms=3, and the lane died after 7 minutes. A built-in read-only command (git log -1 --oneline) did not prompt.What did not help:
--debug,--debug-file, and theGROK_SANDBOXenvironment form, all with the same refusal.ericlitman commentedon Sep 23, 2026
Factory plan review: revise (operator review of the plan dated 2026-09-11, card revision 14)
The investigation is sound: the bug is still present on
main. The runner has no handling for a host without Landlock orbwrap, and it reportschild-failed/70 aftergrok modelspasses. The plan cannot be approved yet, for these reasons:Post the complete plan in the thread. The last round wrote the plan to a sandbox file (
.mastracode/plans/issue-56-grok-cloud-sandbox.md) and posted only a short summary. The next round must post the full plan as its final message, using every section of the planning template: Goal, Scope (In/Out), Kind, Findings, Phases, Expected files, Risks, Assumptions, Open questions, Acceptance evidence.List the receipt-contract choice under Open questions; don't decide it in the plan. The previous plan bumped the receipt
schemaVersionfrom 1 to 2 on its own. The maintainer should choose between these three options:unavailable-sandboxstatus with exit code 69 and a schema bump.bwrapare unsupported for Grok lanes.Give a recommendation, but leave the choice open.
Plan the order against the open runner PRs. fix(runner): preserve Grok cancellation evidence and restrict read-only tools #79, fix(runner): let headless Grok writers run shell commands #81 and fix(runner): pre-approve file edits for headless Grok writers #84 all change
run.ts,types.ts,parse-output.tsorcommands.ts. fix(runner): preserve Grok cancellation evidence and restrict read-only tools #79 also changes theRunnerReceiptfields. State which order the plan assumes and how the fix is rebased if those merge first.Re-check the Grok CLI version. The reporter's evidence is from Grok 1.0.13. fix(runner): let headless Grok writers run shell commands #81 and fix(runner): pre-approve file edits for headless Grok writers #84 describe Grok CLI 1.0.41. Confirm, or record as an assumption, whether
--sandbox read-onlyand--sandbox workspacestill refuse to start without Landlock orbwrapon the current CLI.Never substitute
--sandbox devboxoroff, as the earlier plan already said.ericlitman commentedon Oct 1, 2026
Maintainer decision (2026-10-01): option (c). Document that Claude Code cloud sessions without Landlock or bwrap can't run Grok lanes. When the runner hits that refusal, the existing
child-failedresult names the cause. There's no new receipt status and no schema bump. Never substitute--sandbox devboxoroff. Prior art: #82.ericlitman commentedon Oct 4, 2026
Factory plan verdict: revise
82a76bf6, plan-review revision 17.de67e6b.gpt-5.6-sol, from the plan session's message metadata.Why revise
child-failedresult already carries Grok's own refusal text in its evidence, and the docs point readers to it.main(be66d68) and remove the references to those PRs.What the revised plan should contain
plugins/pstack/skills/poteto-mode/references/provider-dispatch.md, next to the existing parent-sandbox paragraph at line 72. The note says:read-onlyandworkspacesandboxes need Landlock, plus bubblewrap on Linux.child-failed, and the receipt evidence contains Grok's refusal text.devboxoroff.setup-pstackso a failed Grok probe on such a host points to that section.provider-dispatch.mdis a port-owned file. CheckUPSTREAM.mdbefore editing.Build conditions
scripts/runner/.provider-dispatch.mdandsetup-pstackshow the new text. The change is docs only, so no Landlock-less host is needed.ericlitman commentedon Oct 4, 2026
Factory plan verdict: approve
82a76bf6, plan-review revision 20.gpt-6.1-sol, from the plan session's message metadata.Why approve
Every gate passes, and Open questions is
None.git diff --exit-code … scripts/runner/) enforces that.main(be66d68):provider-dispatch.md:72is the parent-sandbox paragraph.provider-dispatch.md:83is the Grok auto-mode paragraph, which the plan preserves.setup-pstack/SKILL.mdcontains the probe section.child-failedis tied to this cause.Build conditions
CHANGES.md, matching what recent PRs do (Prevent project startup configuration from overriding runner authentication [#25] #113, Honor active harness config homes in setup-pstack [#120] #123). That file records this port's adaptations, andsetup-pstack/SKILL.mdis upstream-derived.Merge pull request #125 from ericlitman/factory/issue-56
docs(ericlitman#56): explain why bounded Grok lanes require host sand…
Merge upstream main after 1.5.0 into the local build