Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Grok's "Always allow this session" no longer saves a project-wide grant #13796

Mergedjuliusmarmingemerged 1 commit intot3code/codex-turn-mapping fromrefs/pull/13796/headmerged by juliusmarminge View on GitHub

Showing 5 changed files with 21 additions and 0 deletions (loading 2).

x
0 of 5 viewed, 5 left
2 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/GrokAdapterV2.tsModified
View file
@@ -24,6 +24,7 @@
import {
applyGrokAcpModelSelection,
currentGrokModelIdFromSessionSetup,
+ grokApprovalOptions,
makeGrokAcpRuntime,
resolveGrokAcpBaseModelId,
} from "../../provider/acp/GrokAcpSupport.ts";
@@ -280,6 +281,7 @@
// what its classifier blocked, so every prompt it sends goes to the user.
permissionDisposition: (policy, request) =>
grokLaunchRuntimeMode(policy) === "auto" ? "ask" : acpPermissionDisposition(policy, request),
+ approvalOptions: grokApprovalOptions,
promptFailure: (cause) =>
makeProviderFailure({
cause,
10 additions and 0 deletionsapps/server/src/orchestration-v2/testkit/fixtures/grok_auto_blocked_command/output.tsModified
View file
@@ -84,4 +84,14 @@
frame.method === "session/request_permission",
)?.frame.result;
assert.deepEqual(answer, { outcome: { outcome: "selected", optionId: "allow-once" } });
+​
+ // Grok's bash prompt offers `always-allow`, which it saves for the whole
+ // project, not the session. The card must not offer it as a session choice.
+ const approval = projection.turnItems.find(
+ (item) => item.type === "approval_request" && item.requestId === request.id,