Skip to content

fix(tools): unregister enter_plan_mode/exit_plan_mode (complete #73) - #75

Merged
anfibiacreativa merged 1 commit into
mainfrom
hotfix/disable-plan-mode-tools
Aug 22, 2026
Merged

fix(tools): unregister enter_plan_mode/exit_plan_mode (complete #73)#75
anfibiacreativa merged 1 commit into
mainfrom
hotfix/disable-plan-mode-tools

Conversation

@anfibiacreativa

Copy link
Copy Markdown
Member

Summary

Stop da-agent from entering plan mode. PR #73 removed the plan-mode prompt guidance
but left the two plan tools registered; the model still called them from the tool
schema alone. This unregisters enter_plan_mode/exit_plan_mode while plan mode is
disabled.

Problem

After #73 (merged Aug 19), da-agent still enters plan mode: it calls
enter_plan_mode and then exit_plan_mode, which (needsApproval) surfaces a generic
tool-approval card the da-nx client can't render as a plan. Root cause: #73 removed the
system-prompt planning bracket, but src/tools/tools.ts still registered both
tools with self-instructing descriptions ("Call this before … 2 or more distinct
steps…"), so the model invoked them straight from the schema. #73 was incomplete.

What changed

  • src/tools/tools.ts — do not register enter_plan_mode / exit_plan_mode while
    plan mode is disabled (replaced the registration block with a HOTFIX note). Both
    execute() were no-ops and nothing else references the tools (only comments), so this
    is self-contained and affects no other tool.
  • test/eds-tools.test.ts — guard test asserting neither tool is registered by
    createDATools (flip back to toHaveProperty when re-enabling).

Test plan

  • npx tsc --noEmit — clean.
  • npm test — 374 passing.
  • Grep: 0 tools.enter_plan_mode/tools.exit_plan_mode registrations remain.

Risks

Follow-up

Restore the prompt block and re-register these tools together when da-nx#658
(client renders plan/tasks) lands. Comments in both files point to it.

PR #73 removed the plan-mode *prompt* guidance, but left both tools registered
with self-instructing descriptions ('Call this before ... 2+ steps'), so the model
still entered plan mode from the schema alone and exit_plan_mode surfaced a generic
approval card the client can't render as a plan. Stop registering both tools while
plan mode is disabled. Both execute() were no-ops and nothing else references them,
so it's self-contained. Restore with the prompt block when da-nx#658 lands.

tsc clean; full suite green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@anfibiacreativa
anfibiacreativa merged commit 4493675 into main Aug 22, 2026
4 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.30.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants