diff --git a/src/auto-reply/reply/commands-acp.test.ts b/src/auto-reply/reply/commands-acp.test.ts index 166f8f3762e..5800fee1209 100644 --- a/src/auto-reply/reply/commands-acp.test.ts +++ b/src/auto-reply/reply/commands-acp.test.ts @@ -834,6 +834,22 @@ describe("/acp command", () => { expect(result?.reply?.text).toContain("ACP sessions"); }); + it("allows mutating /acp actions for internal operator.admin clients", async () => { + mockBoundThreadSession(); + + const result = await runInternalAcpCommand({ + commandBody: "/acp set-mode plan", + scopes: ["operator.admin"], + }); + + expect(hoisted.setModeMock).toHaveBeenCalledWith( + expect.objectContaining({ + mode: "plan", + }), + ); + expect(result?.reply?.text).toContain("Updated ACP runtime mode"); + }); + it("updates ACP config options and keeps cwd local when using /acp set", async () => { mockBoundThreadSession();