Skip to content

fix: add maxTurns limit to prevent agent loop#44

Closed
chidev wants to merge 1 commit intoqwibitai:mainfrom
lev-os:fix/max-turns
Closed

fix: add maxTurns limit to prevent agent loop#44
chidev wants to merge 1 commit intoqwibitai:mainfrom
lev-os:fix/max-turns

Conversation

@chidev
Copy link
Copy Markdown

@chidev chidev commented Feb 3, 2026

Summary

Adds a configurable maxTurns limit to prevent runaway agent loops that could consume excessive resources.

Related Issue

Fixes #30

Test Plan

  • TypeScript compiles
  • Manual verification

Notes

Ported from lev-os fork.

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.
@chidev chidev requested a review from gavrielc as a code owner February 3, 2026 05:12
@chidev
Copy link
Copy Markdown
Author

chidev commented Feb 3, 2026

Closing - premature submission, will resubmit after review

@chidev chidev closed this Feb 3, 2026
kenansun-dev-bot Bot pushed a commit to kenansun-dev/nanoclaw-github-copilot that referenced this pull request Apr 12, 2026
Removed early return for unregistered chats in telegram.ts and teams.ts.
Messages now flow to index.ts which handles pair instructions.
Updated test to match new behavior.

344/344 tests pass.

Co-authored-by: Kenan VM Claw <vm-claw@kenan.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: Add maxTurns limit to prevent agent loop runaway

1 participant