fix(tools): unregister enter_plan_mode/exit_plan_mode (complete #73) - #75
Merged
Merged
Conversation
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>
hannessolo
approved these changes
Aug 20, 2026
mhaack
approved these changes
Aug 20, 2026
Contributor
|
🎉 This PR is included in version 1.30.4 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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.
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_modewhile plan mode isdisabled.
Problem
After #73 (merged Aug 19), da-agent still enters plan mode: it calls
enter_plan_modeand thenexit_plan_mode, which (needsApproval) surfaces a generictool-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.tsstill registered bothtools 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 registerenter_plan_mode/exit_plan_modewhileplan 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 thisis self-contained and affects no other tool.
test/eds-tools.test.ts— guard test asserting neither tool is registered bycreateDATools(flip back totoHavePropertywhen re-enabling).Test plan
npx tsc --noEmit— clean.npm test— 374 passing.tools.enter_plan_mode/tools.exit_plan_moderegistrations remain.Risks
no-op executes).
fix(prompt): disable plan mode until da-nx client renders it (da-nx#658) #73's incompleteness explains reports of plan mode persisting even where fix(prompt): disable plan mode until da-nx client renders it (da-nx#658) #73 was live.
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.