fix(goals): route /goal through the bridge-driven loop so clients see goal progress - #181
Open
samuelchanx wants to merge 1 commit into
Open
fix(goals): route /goal through the bridge-driven loop so clients see goal progress#181samuelchanx wants to merge 1 commit into
samuelchanx wants to merge 1 commit into
Conversation
… goal progress /goal kept the legacy backend goal mode (session/goal), whose backend-internal turns the translator must drop (ghost-completed guard) — so ACP clients never saw goal progress: only "goal set" plus untyped leaked events that clients render as "Other" (william0wanggh-178). /goal now shares the /auto GoalLoopDriver machinery, streaming every round's tool calls and text to clients live. ZCODE_ACP_GOAL_MODE= backend restores the legacy behavior; /goal clear is a stop alias for backend action=clear parity; no-arg /goal shows loop status from the live driver or saved state. Also adds scripts/goal-e2e-check.mjs, a minimal stdio ACP client that verifies goal rounds stream to the client (A/B: 0.35.2 streams zero events after goal set; this change streams round activity).
Author
|
Added a second commit addressing two adjacent host-config gaps found while testing in Paseo (which renders no ACP config-option picker at all):
Pending-session |
samuelchanx
force-pushed
the
fix/goal-client-rendering
branch
2 times, most recently
from
September 12, 2026 22:00
d389ae8 to
475db16
Compare
Author
|
Trimmed this PR to just the goal-routing fix to keep the diff focused. Two adjacent fixes (ZCODE_ACP_MODE / ZCODE_ACP_THOUGHT_LEVEL host env knobs, and stripping the $ skill prefix for Paseo clients) are no longer part of this PR — they live on the |
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.
Fixes #178
Problem
/goalkept the legacy backend goal mode (session/goal). Those backend-internal turns must be dropped by the per-prompt translator (skippingForeignTurn, the ghost-completed guard), so ACP clients never saw goal progress — only thegoal setacknowledgement plus a few untyped leaked events that clients render as generic "Other" rows. Repro and evidence in #178.Fix
/goalnow shares the/autobridge-driven GoalLoopDriver machinery (autoFlow()), which runs rounds through the normalrunOneTurndispatch — every round's tool calls and text stream to clients live./goal <objective>starts the loop (full objective, same first-word subcommand rules as/auto)/goal pause|stop|resume|status— same subcommands as/auto/goal clear— stop alias (backendaction=clearparity)/goalwith no argument — shows status from the live driver or saved stateZCODE_ACP_GOAL_MODE=backendrestores the legacy backend goal modesession/goalextension method is untouched (protocol-level show/state still works)Verification
Unit: full suite green — 84 files / 1163 tests;
tests/goal-slash.test.tsupdated to pin the new routing (driver start, subcommands,clearalias, no-arg status, env escape hatch).E2E against the real backend (
scripts/goal-e2e-check.mjs, included — a minimal stdio ACP client that logs everysession/update):Published 0.35.2 (reproduces #178):
This branch:
Note for reviewers
One UX delta vs the backend mode: the loop's objective lives in bridge state (
goal-loop/state.ts), not backend goal state — so clients that render the backend goal banner read empty during a loop. The trade-off is the live progress stream, which the backend mode cannot offer (its turns are invisible by construction). Happy to also emit a typed goal-status notification if there's a preferred shape.