feat(core,cli): M3c-rest — AskUserQuestion + ExitPlanMode tools#23
Merged
Conversation
Two agent-control tools added to BUILTIN_TOOLS.
· packages/core/src/tools/ask-user.ts — host delegates via
ToolContext.askUser callback; returns error in headless. Caps options at 4
and surfaces host errors as tool errors.
· packages/core/src/tools/exit-plan.ts — flips ToolContext.modeSignal.
exitPlanMode = true so the agent loop owner can switch mode plan →
default after the turn.
· packages/core/src/types.ts — ToolContext gains askUser? and modeSignal?
optional fields.
· packages/core/src/agent.ts — RunAgentOptions.askUser pass-through;
RunAgentResult.modeSignal exposed so callers can act on ExitPlanMode.
· apps/cli/src/repl.ts — REPL askUser callback: prints question + numbered
options + reads either a number or free text (returned as "Other: ...").
Also flips ctx.mode from 'plan' to 'default' when result.modeSignal
.exitPlanMode is set.
Tests: +9 (5 ask-user + 3 exit-plan + still 1 reminder cleanup).
Total: 387 → 396 passing (cli 47 unchanged).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
oratis
added a commit
that referenced
this pull request
May 28, 2026
Updates to reflect PRs #23-#33. Major milestones now ≥100% except: · M6 Mac client: 25% (skeleton only; Electron/Vite/Tailwind dep install + dmg + signing is the remaining single-piece work) · M7 file panel: 15% (depends on M6-rest) · M8: 75% (vim/keybindings/headless/worktree/launchd ✅; voice waiting) · M9: 65% (CI matrix + dependabot ✅; mac build step waits on M6) Honest remaining estimate: 3-4 weeks single-engineer-focused for v1 ship, or 2 weeks with 2-3 engineers parallel. M6 Electron is the constraint. Co-authored-by: Claude Opus 4.7 (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.
AskUserQuestion delegates to ToolContext.askUser (REPL wires a numbered prompt; headless errors). ExitPlanMode flips modeSignal.exitPlanMode; REPL flips ctx.mode plan→default. Tests 387→396.