feat(goal-loop): a per-agent Goal Loop MCP command, and the overlay chord off ⌘⇧Y - #1045
Merged
Merged
Conversation
…hord off ⌘⇧Y - #1006: every sibling built-in MCP domain (TLDR, Goal) has a per-agent enable command, but goal_loop had only its Settings row. The new enable-goal-loop-mcp mirrors enable-goal-mcp: it toggles the per-agent override and reloads the agent. It is covered by the real-hook per-agent override and reset test, listed in the feature reference, and counted in the catalog (124, and 43 approved additions). - #1007: goal-loop-preview moves from ⌘⇧Y, which macOS reserves for the system New Sticky Note service and check:keybindings cannot see, to ⌘⇧G. That chord is beside the Goal peek (⌘G) and was freed when the unified stage retired Global Dispatch. The router tests use the new chord and assert the old one does nothing, and the Settings text is updated. check:keybindings is OK. Closes #1006 Closes #1007 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ff ends the loop Review of #1045 (CHANGES REQUESTED): 1. Blocking: Cmd+Shift+G is Monaco's Find Previous, exactly as Cmd+G beside it is Find Next. Review reproduced the collision: pressing it in the global editor ran Find Previous AND latched the goal-loop overlay, and the latch gate then swallowed every keystroke until Escape. check:keybindings passed only because Monaco's find chords were not in the reservation table. - The router now yields the chord whenever editor chrome owns the target, the same rule Cmd+L and Cmd+G already follow, returning without preventDefault so Monaco's own handler runs. - The stale-latch branch yields too: it still drops the latch, but consuming the key there cost one find per stale latch. - reservations.ts records Monaco's Find Previous (verified in monaco-editor findController.js) with an approved overlap, so the checker stops offering the chord as free. 14 reserved interactions, 9 approved overlaps, check:keybindings OK. 2. Turning Goal Loop MCP off now ends a running loop. The loop is harness-owned and survives the reload, but the reloaded agent has no goal_loop_complete: it could never report success, and every continuation would run to the cap. The stop names the session the loop is filed under, before the replacement exists, and a failure to stop never blocks the reload. 3. The stale WHY naming #1007 as future work, the Settings text and the defaults comment are updated. Tests: the router suite gains the positive chord case, an editor-owned case and a stale-latch editor case; the last two fail with the yield reverted. The MCP-preferences suite pins the loop stop, and that the enable direction never touches the loop. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…e global one Codex review of #1045. A transcript code block is a real Monaco instance mounted by lib/code/CodeBlock.tsx with no [data-global-editor-input-owner] marker, and Monaco binds Find Previous on read-only editors too. The first guard therefore still let the goal-loop overlay latch over a code block in the ordinary feed, where it swallowed every following key. Both guards — the routed path and the stale-latch branch — now match Monaco's own `.monaco-editor` root class as well, through one shared selector. The new router test focuses a marker-less code block and fails with the class removed from that selector. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Closes #1006. Closes #1007.
#1006: Goal Loop MCP command
Every sibling built-in MCP domain has a per-agent enable command (
enable-tldr-mcp,enable-goal-mcp), butgoal_loophad only its Settings row. "Turn the loop on for just this agent" therefore meant a trip through Settings.enable-goal-loop-mcpmirrorsenable-goal-mcp:Also in this change:
goal_loop: the per-agent off override, a reload, and Use Global MCP Settings restoring inheritance.#1007: the overlay chord
goal-loop-previewmoves from ⌘⇧Y, which macOS reserves for the system "New Sticky Note" service, to ⌘⇧G.check:keybindingsmodels only in-app owners, so it couldn't see that conflict.check:keybindingsis OK: 45 binding sets, 13 reserved interactions, 8 approved overlaps.Verification
Command-palette, workspace commands, goal-loop and settings suites: 304/304. The MCP-preferences suite passes, and
npx tsc -bis clean.🤖 Generated with Claude Code