Conversation
Pilot's verdict prompt defined "fail" as "scenario was attempted but the goal was not achieved" and "continue" as "tester hasn't completed the goal" — indistinguishable for an incomplete flow. Three further clauses narrowed "continue" to an evidence gap only, so a tester that stopped one action short of the goal, with the remaining control visible and enabled, could only be failed. Make the two verdicts exact complements: "fail" when no further step toward the goal is available on the current page, "continue" when the control for the next step is present (guidance must name it) or a missing check would change the verdict. Drop the duplicated decision list from the user message, which restated the system prompt with the narrower wording. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
DenysKuchma
approved these changes
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Session
PrimitiveWideGold610(Langfuse trace731f1aa67d1e6d4e8991d90f54027541): the scenario was "Launch the currently displayed plan and verify that the launch workflow produces a visible execution or run context." Tester clicked Launch, landed in the "New Manual Run" dialog, asserted only that the plan title was visible there, and calledfinish.Pilot read the state correctly — its own visual analysis said "The Launch button is visible and enabled, but it has not been activated; therefore, no resulting execution/run context is visible yet" — and returned
{"decision":"fail","guidance":null}. The run ended at the open dialog, one click short of its goal.The recovery channel exists (
continue+ guidance →testerConversation.addUserText) and was unreachable.reviewDecision's prompt made the two verdicts indistinguishable for an incomplete flow:"fail": scenario was attempted but the goal was not achieved."continue": tester hasn't completed the goal; provide concrete guidance.and then three separate clauses narrowed
continueto an evidence gap — while this was an action gap. A 3:1 framing majority sends every incomplete-but-reachable state tofail.Change
One decision site,
src/ai/pilot.ts, prompt only.failandcontinuebecome exact complements: fail when no further step toward the goal is available on the current page; continue when the control for the NEXT step is present there (guidance must name it), or a concrete missing check would change the verdict. "Next step" excludes retrying the step already taken, so a tester that merely repeats itself still lands onfail.continuewording, and its last line duplicatedbuildSharedEvidenceRulesverbatim.The wording stays general: dialogs, confirmations, wizard steps and multi-step forms all fit "the control for the next step is present."
Trade-off
More
continueverdicts, so a tester stopping mid-flow now costs iterations before a verdict. The narrowing being removed arrived inside a broad feature commit (15bda39), not a dedicated anti-loop fix, so no recorded loop depends on it. Remaining brakes:MAX_ITERATIONS = 30,shouldStopForStalledExecution(forces final review after 3 iterations with no state change and no successful action — note a successful assertion resets that counter), and Pilot seeing its own priorPilot: continue —notes in<notes>on the next review.Testing
bun test tests/integration/— 149 pass, 0 failbun test tests/unit/— 1415 pass, 0 failbun run format— cleanBehavioral change is in a prompt, so it wants a regression run to confirm: expectation on a replay of this scenario is one
continueverdict whose guidance names the remaining step, then 1-2 more tester actions and apass— and zerofailverdicts on a state where the next control is enabled.🤖 Generated with Claude Code