Flask error tracking your coding agent can read

The Runheed Python SDK hooks into Flask's own request-exception signal. Every unhandled exception is reported with the method and URL, and Flask still answers the request the way it always does: a 404 stays a 404 and is not reported. Your agent reads the errors over MCP.

Set it up

  1. 1.Install the SDK.

    terminalbash
    pip install https://runheed.com/dl/runheed-0.1.0-py3-none-any.whl
  2. 2.Initialize it and attach it to your app.

    app.pypython
    import os
    import runheed
    from flask import Flask
    from runheed import FlaskIntegration
    
    runheed.init(dsn=os.environ["RUNHEED_DSN"], environment="production")
    
    app = Flask(__name__)
    integration = FlaskIntegration()
    integration.setup(runheed.get_client())
    integration.init_app(app)
  3. 3.Connect your agent.

    terminalbash
    claude mcp add runheed --env RUNHEED_API_KEY=al_... -- npx -y https://runheed.com/dl/runheed-mcp-0.1.0.tgz

The npm and PyPI releases are not out yet, so these commands install the same package files straight from runheed.com. Nothing else changes when the registry versions ship.

What it catches

  • Unhandled exceptions in routes, with method and URL
  • Errors logged through the logging module (on by default)
  • Errors you report with runheed.capture_exception(e)

What it does not do

  • abort() and other HTTP errors are not reported, since they are responses you chose
  • Background jobs need capture_exception in their own except blocks
  • No performance tracing: Runheed tracks errors only

Then ask your agent

> what broke in production since the last deploy? fix the top one and resolve it with the commit hash

Common Flask errors

Plans from $29/moOther agents and editorsCancel any time from the billing portal