Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(codex): full access no longer asks to approve commands and patches #38783

Closedshoutez(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/38783/headopened View on GitHub

Showing 2 changed files with 121 additions and 4 deletions.

x
0 of 2 viewed, 2 left
96 additions and 4 deletionsapps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.tsModified
View file
@@ -3586,6 +3586,85 @@
+ it.effect("accepts command and patch approvals in Full access without asking", () =>
+ Effect.gen(function* () {
+ const nativeThreadId = "full-access-approval-thread";
+ const turnId = "full-access-approval-turn";
+ const prompt = "Clean up the scratch directory.";
+ const approval = (input: {
+ readonly id: number;
+ readonly kind: "commandExecution" | "fileChange";
+ readonly itemId: string;
+ }): ReadonlyArray<CodexReplay.CodexAppServerReplayEntry> => [
+ {
+ type: "emit_inbound",
+ label: `${input.itemId} approval`,
+ frame: {
+ id: input.id,
+ method: `item/${input.kind}/requestApproval`,
+ params: {
+ threadId: nativeThreadId,
+ turnId,
+ itemId: input.itemId,
+ startedAtMs: 1782622441000,
+ ...(input.kind === "commandExecution"
+ ? { command: `trap 'rm -rf "$dir"' EXIT` }
+ : {}),
+ },
+ },