fix: increase default max iterations for agents to improve performanc…#144
Merged
Merged
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.
Summary
max_iterationsraised from 50 → 500, and the upper cap from 200 → 500, both in the Go service and the DB migration.conversation_idfrom theConversationconstructor. The sandbox server assigns its own internal UUID; passing our application ID causedGET /api/conversations/{id}to return 400 on all subsequent calls. Event callbacks already persist to our DB usingtrigger.conversation_iddirectly, so the mapping stays correct.conversation.close()in the executorfinallyblock. Without this, the SDK's WebSocket client thread outlived the sandbox container; when Docker recycled the container IP, the thread would send requests for the old conversation ID to the new container and receive 400s.Changes
services/api/internal/service/agent/agent_service.gomaxIterationsLimit200 → 500; default 50 → 500 (bothCreateAgentandUpdateAgent)services/api/migrations/000008_add_ai_agents.sqlmax_iterationscolumn default 50 → 500services/ai-agent/src/agent/executor.pyconversation_idarg; addconversation.close()infinally; remove unusedimport uuidTest plan
max_iterationsdefaults to 500🤖 Generated with Claude Code