Summary
An OpenCode agent made 277 consecutive calls to gumps_mcp_resource_list searching for a non-existent MCP resource, exhausting the workspace token spend limit. No built-in circuit breaker or loop detection prevented this.
Steps to Reproduce
- Configure an OpenCode agent with an MCP server (MCP Gateway at
https://mcp-dev.gumps.net/mcp)
- Ask the agent to find or use an MCP resource/skill that does not exist on that server (e.g., "m365-inbox")
- Observe the agent repeatedly calling
mcp_resource_list with different filter prefixes
Expected Behavior
After 2–3 consecutive mcp_resource_list calls returning no matching results, the agent should stop searching and report that the resource was not found.
Actual Behavior
The agent called gumps_mcp_resource_list 277 times in a single session, each time with a slightly different filter prefix, all returning empty results. This consumed enough tokens to hit the $500 workspace spend limit, blocking all further agent activity.
The agent did not recognize the pattern of repeated empty results and did not stop.
Acceptance Criteria
Additional Context
- Environment: Production (gumps-daily-flash repo, OpenCode runtime)
- Frequency: Observed once, but the pattern is deterministic — any search for a non-existent resource triggers it
- Business impact: Hit $500 workspace spend limit, blocked all agent activity until limit reset
- Evidence: Changelog entry in
gumps-daily-flash repo: [2026-06-11 10:00] NOTE Agent looped 277 times calling gumps_mcp_resource_list searching for non-existent "m365-inbox" skills
- Workaround applied: Created a project-level
.cursor/rules/loop-prevention.mdc rule instructing agents to stop after 3 consecutive empty results. This is a belt-and-sunders fix at the project level; the platform should enforce this natively.
- User-supplied hypothesis (unverified): This is a bug in OpenCode's loop detection — the platform should have a built-in circuit breaker for repeated tool calls.
Filed by AI Agent | Platform: opencode | Repo: newgumps/it-director
Ref: IT-DIR-f81560f4 | 2026-06-11 | Context: Agent spent $500 workspace limit on 277 MCP resource_list calls
Summary
An OpenCode agent made 277 consecutive calls to
gumps_mcp_resource_listsearching for a non-existent MCP resource, exhausting the workspace token spend limit. No built-in circuit breaker or loop detection prevented this.Steps to Reproduce
https://mcp-dev.gumps.net/mcp)mcp_resource_listwith different filter prefixesExpected Behavior
After 2–3 consecutive
mcp_resource_listcalls returning no matching results, the agent should stop searching and report that the resource was not found.Actual Behavior
The agent called
gumps_mcp_resource_list277 times in a single session, each time with a slightly different filter prefix, all returning empty results. This consumed enough tokens to hit the $500 workspace spend limit, blocking all further agent activity.The agent did not recognize the pattern of repeated empty results and did not stop.
Acceptance Criteria
Additional Context
gumps-daily-flashrepo:[2026-06-11 10:00] NOTE Agent looped 277 times calling gumps_mcp_resource_list searching for non-existent "m365-inbox" skills.cursor/rules/loop-prevention.mdcrule instructing agents to stop after 3 consecutive empty results. This is a belt-and-sunders fix at the project level; the platform should enforce this natively.Filed by AI Agent | Platform: opencode | Repo: newgumps/it-director
Ref: IT-DIR-f81560f4 | 2026-06-11 | Context: Agent spent $500 workspace limit on 277 MCP resource_list calls