Skip to content

feat(goal-loop): a per-agent Goal Loop MCP command, and the overlay chord off ⌘⇧Y - #1045

Merged
Juliusolsson05 merged 3 commits into
mainfrom
fix/goal-loop-command-parity
Sep 20, 2026
Merged

Juliusolsson05 merged 3 commits into
mainfrom
fix/goal-loop-command-parity

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

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), but goal_loop had only its Settings row. "Turn the loop on for just this agent" therefore meant a trip through Settings.

enable-goal-loop-mcp mirrors enable-goal-mcp:

  • the provider gate is repeated at the mutation boundary;
  • it toggles the per-agent override and reloads the agent.

Also in this change:

  • it is listed in the goal-loop feature reference, and the prerequisites text says where to toggle it;
  • catalog governance is 123 → 124, with approved additions 42 → 43;
  • the real-hook MCP-preferences test now covers goal_loop: the per-agent off override, a reload, and Use Global MCP Settings restoring inheritance.

#1007: the overlay chord

goal-loop-preview moves from ⌘⇧Y, which macOS reserves for the system "New Sticky Note" service, to ⌘⇧G.

  • check:keybindings models only in-app owners, so it couldn't see that conflict.
  • ⌘⇧G sits beside the Goal peek (⌘G), and was freed when Unified stage layout: one workspace of lanes, rows and a session pool #1013 retired Global Dispatch.
  • The router tests use the new chord and assert that the old one no longer opens the loop.
  • The Settings row text is updated.
  • check:keybindings is 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 -b is clean.

🤖 Generated with Claude Code

Juliusolsson05 and others added 3 commits September 19, 2026 02:07
…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>
@Juliusolsson05
Juliusolsson05 merged commit 67c98f9 into main Sep 20, 2026
2 checks passed
@Juliusolsson05
Juliusolsson05 deleted the fix/goal-loop-command-parity branch September 20, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant