fix: add maxTurns limit to prevent agent loop runaway#36
Closed
NSEvent wants to merge 1 commit intoqwibitai:mainfrom
Closed
fix: add maxTurns limit to prevent agent loop runaway#36NSEvent wants to merge 1 commit intoqwibitai:mainfrom
NSEvent wants to merge 1 commit intoqwibitai:mainfrom
Conversation
Addresses issue qwibitai#30 with two changes: 1. Add `maxTurns: 10` to the query options in agent-runner - Prevents unlimited loop iterations that can cause duplicate messages - 10 turns is sufficient for complex tasks while preventing runaway behavior 2. Improve `send_message` tool response format - Changed from ambiguous "queued for delivery" to clear "✓ Message sent successfully" - Includes preview of sent message for confirmation - Better signals task completion to prevent SDK retry behavior Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
chidev
added a commit
to lev-os/nanoclaw
that referenced
this pull request
Feb 3, 2026
Adds maxTurns: 10 to agent query options and improves send_message tool response to give clear success signal, preventing retries. Cherry-picked from upstream PR qwibitai#36.
2 tasks
chidev
added a commit
to lev-os/nanoclaw
that referenced
this pull request
Feb 3, 2026
Adds maxTurns: 10 to agent query options and improves send_message tool response to give clear success signal, preventing retries. Cherry-picked from upstream PR qwibitai#36.
c83bc27 to
80e68dc
Compare
Collaborator
|
@NSEvent Thank you for the PR.
Closing this I'm not sure it's an appropriate fix. Will look into the issue separately |
dratspiker
added a commit
to dratspiker/nanoclaw
that referenced
this pull request
Mar 19, 2026
jbaruch
pushed a commit
to jbaruch/nanoclaw-public
that referenced
this pull request
Apr 9, 2026
…, duplicate check Promote script now: - Validates tile placement before copying (red flag grep for admin content) - Blocks skills that already exist in another tile (prevents duplicates) - Reports blocked items with reasoning New rule: no-inplace-overrides — all changes via promotion pipeline only, never write directly to /workspace/group/skills/. Updated skill-tile-placement rule with: - More examples (17 skills mapped) - Explicit "ASK Baruch when in doubt" instead of silent default - "Skills must NEVER duplicate across tiles" section - Clearer red flag list Bump admin 0.1.104. Closes qwibitai#36. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
kenansun-dev-bot Bot
pushed a commit
to kenansun-dev/nanoclaw-github-copilot
that referenced
this pull request
Apr 12, 2026
…ibitai#36) 1. DEFAULT_CONFIG in init.ts updated to agents.defaults format (was old providers format) 2. host-runner always uses source .ts (not stale dist/) 3. Init next steps mention host mode option 344/344 tests pass. Co-authored-by: Kenan VM Claw <vm-claw@kenan.dev>
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
Fixes #30 - Adds
maxTurnslimit and improves tool response format to prevent agent loop runaway.Changes
1. Add
maxTurns: 10to query optionsFile:
container/agent-runner/src/index.ts10 turns is sufficient for complex tasks while preventing runaway behavior that caused the incident (21 duplicate messages in 32 seconds).
2. Improve
send_messagetool responseFile:
container/agent-runner/src/ipc-mcp.tsBefore (ambiguous):
After (clear success signal):
The clearer response format helps the SDK understand the task is complete, reducing retry behavior.
Test plan
./container/build.shAcceptance Criteria from Issue
maxTurns: 10added to query options incontainer/agent-runner/src/index.tsipc-mcp.ts🤖 Generated with Claude Code