Multi-Agent Collaboration for Team and Friends
TypeScript agent-automationagent-orchestrationagent-workflowai-agentsai-collaborationai-memoryai-workforceautonomous-agentsclaude-codeclaude-code-skillscodexcoding-agentmulti-agentmultiple-agentone-person-businessone-person-companyone-person-teamopencodesolopreneur
fix(cli): disable codex sandbox for unrestricted agent execution
Gener57e6cdf60a58
diff --git a/src/cli/daemon/agent/__tests__/codex.test.ts b/src/cli/daemon/agent/__tests__/codex.test.tsindex 30edab815..bf3b3fdf4 100644--- a/src/cli/daemon/agent/__tests__/codex.test.ts+++ b/src/cli/daemon/agent/__tests__/codex.test.ts@@ -115,14 +115,14 @@ describe("CodexBackend", () => {backend = new CodexBackend("/usr/bin/codex");});- it("spawns codex with network_access config flag", async () => {+ it("spawns codex without sandbox config flags", async () => {const { spawn } = await import("child_process");const session = backend.execute("hello", { cwd: "/tmp" });const mock = getMock();const spawnCall = (spawn as any).mock.calls[0];- expect(spawnCall[1]).toContain("--config");- expect(spawnCall[1]).toContain("sandbox_workspace_write.network_access=true");+ expect(spawnCall[1]).not.toContain("--config");+ expect(spawnCall[1]).toEqual(["app-server", "--listen", "stdio://"]);mock.proc.emit("close", 0);await session.result;@@ -164,7 +164,7 @@ describe("CodexBackend", () => {await session.result;});- it("thread/start includes correct params without developerInstructions", async () => {+ it("thread/start includes danger-full-access sandbox and no developerInstructions", async () => {const session = backend.execute("hello", {cwd: "/tmp",model: "gpt-4",@@ -179,7 +179,7 @@ describe("CodexBackend", () => {expect(threadWrite).toBeDefined();const parsed = JSON.parse(threadWrite!);expect(parsed.params.cwd).toBe("/tmp");- expect(parsed.params.sandbox).toBe("workspace-write");+ expect(parsed.params.sandbox).toBe("danger-full-access");expect(parsed.params.persistExtendedHistory).toBe(true);expect(parsed.params.experimentalRawEvents).toBe(false);expect(parsed.params.developerInstructions).toBeUndefined();diff --git a/src/cli/daemon/agent/codex.ts b/src/cli/daemon/agent/codex.tsindex 4737d6a23..95f4c8d70 100644--- a/src/cli/daemon/agent/codex.ts+++ b/src/cli/daemon/agent/codex.ts@@ -46,7 +46,7 @@ export class CodexBackend implements AgentBackend {constructor(private cliPath: string) {}execute(prompt: string, options: ExecOptions): AgentSession {- const proc = spawn(this.cliPath, ["app-server", "--listen", "stdio://", "--config", "sandbox_workspace_write.network_access=true"], {+ const proc = spawn(this.cliPath, ["app-server", "--listen", "stdio://"], {cwd: options.cwd,stdio: ["pipe", "pipe", "pipe"],env: { ...process.env, ...options.env },@@ -470,7 +470,7 @@ export class CodexBackend implements AgentBackend {// thread/start creates a new threadconst threadParams: Record<string, unknown> = {cwd: options.cwd,- sandbox: "workspace-write",+ sandbox: "danger-full-access",persistExtendedHistory: true,experimentalRawEvents: false,};