Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(codex): full access no longer stops on dangerous command prompts #39044

ClosedRhysSullivan(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/39044/headopened View on GitHub

Showing 2 changed files with 129 additions and 0 deletions.

x
0 of 2 viewed, 2 left
115 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.tsModified
View file
@@ -1745,6 +1745,121 @@
+ it.effect.each([
+ { policy: "default", approvalPolicy: undefined },
+ { policy: "on-request", approvalPolicy: "on-request" },
+ ] as const)(
+ "answers dangerous command prompts in full access with the $policy approval policy",
+ ({ policy, approvalPolicy }) =>
+ Effect.gen(function* () {
+ const nativeThreadId = `dangerous-command-${policy}-thread`;
+ const nativeTurnId = `dangerous-command-${policy}-turn`;
+ const prompt = "Clean up the scratch directory.";
+ const pending = yield* Queue.unbounded<OrchestrationV2RuntimeRequest>();
+ const harness = yield* makeCodexReplayHarness(
+ makeCodexReplayTranscript({
+ scenario: `dangerous-command-${policy}`,
+ entries: [
+ ...codexReplayPreamble({
+ nativeThreadId,
+ nativeTurnId,
+ prompt,
+ ...(approvalPolicy === undefined
+ ? {}
+ : {
+ turnPolicy: { approvalPolicy, sandboxPolicy: { type: "dangerFullAccess" } },
+ }),
+ }),
+ {