fix(pstack): unblock headless Grok writers - #48
Conversation
Greptile SummaryThis PR separates Claude and Grok permission-mode selection so headless Grok isolated-write lanes use
Confidence Score: 5/5The PR appears safe to merge because the provider-specific mapping is internally consistent and no concrete changed-code failure remains. The change is narrowly limited to Grok isolated-write permission prompting, while read-only behavior and the existing workspace, tool, cwd, and recursion restrictions remain represented in the generated command and regression tests.
|
| Filename | Overview |
|---|---|
| plugins/pstack/skills/poteto-mode/scripts/runner/commands.ts | Splits permission-mode selection by provider and changes only Grok isolated-write invocations to bypassPermissions while preserving sandbox, tool, cwd, and recursion controls. |
| plugins/pstack/skills/poteto-mode/scripts/runner/commands.test.ts | Updates isolated-write assertions to cover the new Grok permission mode and retained sandbox, allowlist, and denied-tool arguments. |
| plugins/pstack/skills/poteto-mode/references/provider-dispatch.md | Documents why headless Grok writers require bypassPermissions and reiterates the isolation boundaries that remain active. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Assigned external lane] --> B{Provider}
B -->|Claude| C{Access mode}
C -->|read-only| D[plan]
C -->|isolated-write| E[acceptEdits]
B -->|Grok| F{Access mode}
F -->|read-only| G[plan + read-only sandbox]
F -->|isolated-write| H[bypassPermissions + workspace sandbox]
H --> I[Explicit tools and denied recursive-agent controls]
Reviews (1): Last reviewed commit: "fix(pstack): unblock headless Grok write..." | Re-trigger Greptile
|
I hit this with Grok Build 1.0.13 and open-pstack 1.2.1 on macOS. Two headless writer runs ended with |
Closes #34
Why
pstack-runnerstarts external Grok lanes without interactive stdin. Grok requests permission whensearch_replaceruns underacceptEdits, then cancels the headless turn. UsingbypassPermissionsfor Grokisolated-writelanes lets the explicitly allowed write tool run without a prompt. The assigned working directory,workspacesandbox, tool allowlist, denied tools, and no-subagent controls remain in place.Scope
runner/commands.ts.read-onlylanes onplan; usebypassPermissionsonly for Grokisolated-writelanes.runner/commands.test.ts.provider-dispatch.md.This change does not install or release the plugin.
Blast radius
The behavior change affects only the command that starts a Grok
isolated-writelane. Grokread-onlylanes and all Claude and Codex lanes keep their existing permission modes. AlthoughbypassPermissionsremoves Grok's interactive edit prompt, it does not expand the assigned working directory, sandbox, allowed tools, denied tools, or recursive-agent access.Verification
bun install --frozen-lockfilecompleted with no changes.bun run testpassed all 158 tests.bun run typecheckpassed strict TypeScript checks.PSTACK_STATIC_ONLY=1 bash tests/skill-collision-repro.shpassed all static invariants.git diff --check main...HEADpassed.Live evidence from the source candidate passed. A real Codex-parent Grok
isolated-writerun usedbypassPermissions, theworkspacesandbox, the explicitsearch_replaceallowlist, denied recursive tools, and--no-subagents. The Grok session allowedsearch_replace, completed the requested write, and produced a receipt with exit code 0, statuscomplete, reported modelgrok-4.6-build, and provider-backed model verification.Installed-harness verification is not complete. The source checkout ran directly; no installed Open Pstack plugin was changed or tested. This PR must remain a draft until the repository's installed-candidate gate passes.