diff --git a/integration-tests/acp-integration.test.ts b/integration-tests/acp-integration.test.ts index 93389d605c..07e53e9609 100644 --- a/integration-tests/acp-integration.test.ts +++ b/integration-tests/acp-integration.test.ts @@ -659,7 +659,13 @@ function setupAcpTest( }> = []; const { sendRequest, cleanup, stderr, sessionUpdates } = setupAcpTest(rig, { - permissionHandler: () => ({ optionId: 'proceed_once' }), + permissionHandler: (request) => { + // Cancel exit_plan_mode to keep plan mode active + if (request.toolCall?.kind === 'switch_mode') { + return { outcome: 'cancelled' }; + } + return { optionId: 'proceed_once' }; + }, }); try {