- Agent repeatedly outputs the same text (often their name)
- JSON parsing errors with unterminated strings
- Discord messages fail with timeout errors
This happens when agents are asked to prefix their messages with their names or identifiers. The agent gets confused and enters an infinite loop, repeatedly outputting their name prefix instead of the actual message content.
User: "Please prefix all your messages with your name followed by a colon"
Agent: *Flux:* *Flux:* *Flux:* *Flux:* [continues indefinitely]
- Never ask agents to prefix their messages - The Discord bot already handles agent identification through message formatting
- Remove conflicting tools - Ensure there are no tool name conflicts (e.g., multiple
send_messagetools) - Use proper tool terminal rules - Configure Discord messaging tools to end generation properly
The issue was caused by:
- Tool name collision between Letta's default
send_messageand Pattern's MCPsend_messagetool - Lack of terminal rules on messaging tools, causing the agent to continue generating after sending
- Agents misinterpreting the instruction to prefix messages as a repeating action
- Remove generic messaging tools that conflict with Letta defaults
- Use specific tool names (e.g.,
send_discord_messageinstead ofsend_message) - Configure all messaging tools with proper terminal rules
- Avoid asking agents to modify their message format
src/mcp/server.rs- MCP server and tool handlingsrc/mcp/core_tools.rs- Core MCP tool definitionssrc/agent/constellation.rs- Multi-agent system configurationdocs/architecture/pattern-system-prompts.md- Agent instructions