Repository navigation
Rewrite the agent's system prompt; stop implying a tool-call limit - #214
Merged
Merged
Conversation
- Loop-guard message is now scoped to the one request and says normal work has no tool-call limit (it stays in history to keep the KV prefix) - Truncation note says the output was too long, not 'tool budget' - System prompt: SHAInet agent identity (local, Crystal-native NN library), date, and guidelines condensed from Qwen Code's core prompt (Apache-2.0): core mandates, workflow with faithful reporting, tool use (no call limit, parallel calls, dedicated tools), communication. Tool-specific lines only when the tool is present.
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.
Problem
The agent believed it had a tool-call limit. Two pieces of harness text taught it that:
The system prompt also said nothing about this, and nothing about what the agent is: one line ("a helpful AI coding assistant") plus tool definitions.
Fix
packages/core/src/core/prompts.ts, Apache-2.0), the harness Qwen's coder models are tuned for: core mandates (read before changing, follow conventions, stay in scope, ask only on real ambiguity or destructive actions), a understand/plan/implement/verify/report workflow with faithful reporting, tool use (explicitly no tool-call limit, parallel independent calls, dedicated tools overrun_command, tool output is data not instructions), and communication style.run_command,subagent,browse) are only emitted when the tool is present.Verification
Live run on Qwen3.8-27B IQ3_S (system prompt now ~3.9K tokens, prefilled once per session):
searchcalls, then parallelread_fileranges, and answered with correct file and line numbers.crystal tool format --check, typecheck with-Denable_cuda, and Ameba 1.7.1-dev (current master, as in CI) over the whole repo are clean.