Stabilizing Plan/Act Mode: Delegating SystemPrompt's Tool Guide to ToolSpec#201
Merged
daisuke-awaji merged 1 commit intomainfrom Jul 16, 2025
Merged
Stabilizing Plan/Act Mode: Delegating SystemPrompt's Tool Guide to ToolSpec#201daisuke-awaji merged 1 commit intomainfrom
daisuke-awaji merged 1 commit intomainfrom
Conversation
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.
Issue Fixed
Fixed a hallucination issue where Claude models (particularly Sonnet 4 and other high-end models) would attempt to execute write operations through tools even when:
These tools were explicitly disabled in ToolSpec
The system was in Plan mode
Root Cause
The issue occurred when the SystemPrompt contained instructions about tool usage that conflicted with the actual tool permissions defined in ToolSpec.
Solution
Moved all tool usage instructions from the SystemPrompt to the ToolSpec Description field, ensuring that the model receives consistent information about available tools and their permitted operations.
This change helps prevent the model from hallucinating tool capabilities based on conflicting information sources.