Skip to content

[BUG] kagent-adk static agent spins at 100% CPU on persistent HTTP MCP tool call failures #1530

@rinormaloku

Description

@rinormaloku

📋 Prerequisites

  • I have searched the existing issues to avoid creating a duplicate
  • By submitting this issue, you agree to follow our Code of Conduct
  • I am using the latest version of the software
  • I have tried to clear cache/cookies or used incognito mode (if ui-related)
  • I can consistently reproduce this issue

🚦 Impact/Severity

Blocker (this doesn't just render the agent useless, it as well impacts other processes in the same node)

🐛 Bug Description

Description
When an MCP tool call fails repeatedly due to a persistent connectivity issue (e.g. connection reset by peer), the kagent-adk static Python process enters a tight retry loop with no backoff or circuit breaker, consuming 100% CPU indefinitely.

Steps to reproduce

  1. Deploy a kagent-adk-based agent with an MCP server tool configured
  2. Make the MCP server unreachable at the network level (e.g. waypoint proxy that resets connections)
  3. Send the agent a message that triggers the MCP tool call
  4. Observe CPU usage of the kagent-adk static process

Observed behavior
The agent process spins at 100% CPU. It never surfaces an error to the caller or stops retrying. The only way to stop it is to scale the deployment to 0.

PID 1322590  95.1% CPU
/.kagent/.venv/bin/python3 /.kagent/.venv/bin/kagent-adk static --host 0.0.0.0 --port 8080

The underlying error on the MCP server side:

Post "http://get-weather.kagent:3000/mcp": read tcp ...: read: connection reset by peer

Expected behavior
When an MCP tool call fails persistently, the agent should:

  • Apply exponential backoff between retries
  • Enforce a maximum retry count or timeout
  • Return an error response to the caller rather than looping indefinitely

Environment
kagent-adk: static mode
Transport: HTTP MCP
Platform: Kubernetes (kind)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions