Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Codex full access no longer asks before dangerous commands #37306

Closedjuliusmarmingewants to merge 3 commits intomain fromrefs/pull/37306/headopened View on GitHub

Showing 2 changed files with 85 additions and 0 deletions.

x
0 of 2 viewed, 2 left
76 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.tsModified
View file
@@ -1745,6 +1745,82 @@
+ it.effect("accepts dangerous-command approvals in full-access without asking", () =>
+ Effect.gen(function* () {
+ const nativeThreadId = "command-approval-thread";
+ const nativeTurnId = "command-approval-turn";
+ const prompt = "Clean node_modules.";
+ const pending = yield* Queue.unbounded<OrchestrationV2RuntimeRequest>();
+ const harness = yield* makeCodexReplayHarness(
+ makeCodexReplayTranscript({
+ scenario: "full-access-command-approval",
+ entries: [
+ ...codexReplayPreamble({ nativeThreadId, nativeTurnId, prompt }),
+ {
+ type: "emit_inbound",
+ frame: {
+ id: 0,
+ method: "item/commandExecution/requestApproval",
+ params: {
+ threadId: nativeThreadId,
+ turnId: nativeTurnId,
+ itemId: "exec-rm",
+ command: "/bin/bash -lc 'rm -rf ./node_modules'",
+ startedAtMs: 0,
+ },
+ },
+ },
+ { type: "expect_outbound", frame: { id: 0, result: { decision: "accept" } } },