You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that the base /goal design has been discussed in #4074 and the Stop-hook runaway cap follow-up was captured in #4206, it would be useful to track the next product/technical roadmap for making goal-driven work reliable in Qwen Code.
This issue is intentionally not about the first /goal command only. It is a staged plan for turning /goal from a single slash command into a dependable long-horizon workflow primitive: users set an outcome, Qwen Code keeps making progress, shows why it is continuing or stopping, and fails safely when the goal is impossible or underspecified.
Motivation
/goal is valuable because it removes repeated "keep going" prompts from multi-step work. But the first implementation should be followed by a few layers that make the feature trustworthy in real sessions:
clear progress visibility while the goal is active;
strict but debuggable goal evaluation;
safe stop / recovery behavior for impossible goals;
resume/non-interactive semantics;
observability for why the loop continued or ended;
reusable infrastructure for future agent workflows beyond /goal.
Without these follow-ups, /goal risks becoming either too silent (user cannot tell what is happening) or too aggressive (agent keeps looping without useful progress).
Proposed staged roadmap
Phase 1 — UX hardening for the active goal
Goal: make /goal understandable and controllable during interactive use.
Show a stable active-goal indicator in the footer/status area.
/goal with no args should show:
current condition;
elapsed time or turns since set;
latest judge result/reason, if available;
how to clear or replace it.
/goal <new condition> should replace the current goal, not stack multiple goals.
/goal clear should remove the active hook and clearly report that auto-continuation is disabled.
Keep the visible text compact; avoid dumping the full judge prompt or transcript.
Acceptance criteria:
Users can always tell whether a goal is active.
Users can inspect the latest reason the goal has not been met.
Users can clear or replace a goal without restarting the session.
Phase 2 — Judge reliability and evidence discipline
Goal: make the LLM judge strict enough to be useful, but not a black box.
Feed the judge only the relevant transcript window since the goal was set, plus compact tool results/evidence.
Bias the judge toward not met when required evidence is missing, while requiring concise reasons.
Ensure the main agent is encouraged to surface concrete evidence before stopping, e.g. test output, lint output, git status, created PR URL, etc.
Record the latest judge decision in session state for /goal status display.
Add structured tests for:
met vs not met;
missing evidence;
partial completion;
impossible/ambiguous goals.
Acceptance criteria:
The judge returns { met: boolean, reason: string } or equivalent structured output.
Missing evidence is treated as not met.
The latest judge reason is available to the UI/status path.
Phase 3 — Runaway protection and recovery
Goal: prevent /goal from trapping users in long loops.
#4074 is the base feature. #4206 is one safety guardrail. This issue tracks the broader product direction: making goal-driven work observable, controllable, resumable, and reusable as Qwen Code evolves toward longer-running agent workflows.
Summary
Now that the base
/goaldesign has been discussed in #4074 and the Stop-hook runaway cap follow-up was captured in #4206, it would be useful to track the next product/technical roadmap for making goal-driven work reliable in Qwen Code.This issue is intentionally not about the first
/goalcommand only. It is a staged plan for turning/goalfrom a single slash command into a dependable long-horizon workflow primitive: users set an outcome, Qwen Code keeps making progress, shows why it is continuing or stopping, and fails safely when the goal is impossible or underspecified.Motivation
/goalis valuable because it removes repeated "keep going" prompts from multi-step work. But the first implementation should be followed by a few layers that make the feature trustworthy in real sessions:/goal.Without these follow-ups,
/goalrisks becoming either too silent (user cannot tell what is happening) or too aggressive (agent keeps looping without useful progress).Proposed staged roadmap
Phase 1 — UX hardening for the active goal
Goal: make
/goalunderstandable and controllable during interactive use./goalwith no args should show:/goal <new condition>should replace the current goal, not stack multiple goals./goal clearshould remove the active hook and clearly report that auto-continuation is disabled.Acceptance criteria:
Phase 2 — Judge reliability and evidence discipline
Goal: make the LLM judge strict enough to be useful, but not a black box.
git status, created PR URL, etc./goalstatus display.Acceptance criteria:
{ met: boolean, reason: string }or equivalent structured output.Phase 3 — Runaway protection and recovery
Goal: prevent
/goalfrom trapping users in long loops.Related: #4206.
Acceptance criteria:
Phase 4 — Resume and non-interactive semantics
Goal: define how
/goalbehaves outside a single live TUI session.Open design questions:
/resume/--continue, or should they be session-only?qwen -p "/goal npm test exits 0"keep running until the judge marks it met, with the same caps?Suggested direction:
Acceptance criteria:
Phase 5 — Generalize into an agent workflow primitive
Goal: make
/goala stepping stone toward broader long-horizon agent control.Possible follow-ups:
tests green,PR ready,issue triaged,migration complete.GoalControllerorContinuationControllerabstraction instead of keeping all logic inside one slash command.Acceptance criteria:
/goallogic is not tightly coupled to one command if future continuation workflows need it.Suggested implementation slicing
/goalinspect/replace/clear polish.Risks / mitigations
/goalstatus command.Related issues
/goalslash command proposal.Why track this separately?
#4074 is the base feature. #4206 is one safety guardrail. This issue tracks the broader product direction: making goal-driven work observable, controllable, resumable, and reusable as Qwen Code evolves toward longer-running agent workflows.