Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(codex): full access no longer stops on dangerous command prompts (FBL-854) #39187

Closedleojkwan(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/39187/headopened View on GitHub

Showing 3 changed files with 203 additions and 10 deletions (loading 1).

x
0 of 3 viewed, 3 left
173 additions and 10 deletionsapps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.tsModified
View file
@@ -1745,6 +1745,155 @@
+ const dangerousCommand = {
+ method: "item/commandExecution/requestApproval",
+ params: {
+ itemId: "full-access-command",
+ startedAtMs: 2,
+ command: "/bin/zsh -lc 'tmpdir=$(mktemp -d); rm -rf \"$tmpdir\"'",
+ },
+ } as const;
+ const patch = {
+ method: "item/fileChange/requestApproval",
+ params: { itemId: "full-access-patch", startedAtMs: 2, reason: null, grantRoot: null },
+ } as const;
+ // Full access sends a granular policy, under which Codex still asks before some commands.
+ it.effect.each([
+ { name: "command, default policy", ...dangerousCommand, override: {}, asks: false },
+ { name: "patch, default policy", ...patch, override: {}, asks: false },
+ {
+ name: "command, approval policy override",
+ ...dangerousCommand,
+ override: { approvalPolicy: "on-request" },
+ asks: true,
+ },
+ {
+ name: "patch, sandbox policy override",
+ ...patch,
+ override: { sandboxPolicy: { type: "workspaceWrite" } },