From 6c2db0bec63f5f8be3ef49724b8fe8f968c5b88f Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Thu, 30 Apr 2026 21:13:30 -0700 Subject: [PATCH] test(harness): plumb extraArgs and auto_decided outcome through PTY runner runPlanSkillObservation now accepts extraArgs that pass through to launchClaudePty (which already supported them at the lower level), and exposes a new 'auto_decided' outcome detected via isAutoDecidedVisible when the AUTO_DECIDE preamble template fires (Auto-decided ... (your preference)). Both pieces are needed for the v1.21+ AskUserQuestion-blocked regression tests in the next commit. Detection order is deliberate: 'asked' (rendered numbered list) wins over 'auto_decided' (text only, no list), which wins over 'plan_ready' so the auto-decide evidence isn't masked by a downstream plan-mode confirmation. Co-Authored-By: Claude Opus 4.7 (1M context) --- test/helpers/claude-pty-runner.ts | 71 ++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 16 deletions(-) diff --git a/test/helpers/claude-pty-runner.ts b/test/helpers/claude-pty-runner.ts index 9025448d..3b56fb07 100644 --- a/test/helpers/claude-pty-runner.ts +++ b/test/helpers/claude-pty-runner.ts @@ -138,6 +138,19 @@ export function isPlanReadyVisible(visible: string): boolean { return /ready to execute|Would you like to proceed/i.test(visible); } +/** + * Detect the AUTO_DECIDE preamble template firing. The model prints + * "Auto-decided