PHP error tracking your coding agent can read
Updated 2026-11-13
Runheed accepts events from Sentry SDKs, so a PHP app reports through sentry/sentry: point its DSN at your Runheed project and your coding agent reads each exception over MCP from Claude Code, Cursor or any MCP client. Tested with sentry/sentry 4.37. Laravel and Symfony apps add sentry/sentry-laravel or sentry/sentry-symfony, which use it underneath.
Set it up
1.Install the SDK.
terminalbashcomposer require sentry/sentry # Laravel: composer require sentry/sentry-laravel2.Initialize it with the project's Sentry SDK DSN (Projects page, or ask your agent: runheed_list_projects). Laravel reads SENTRY_LARAVEL_DSN from .env instead.
bootstrap.phpphp<?php // RUNHEED_SENTRY_DSN=https://<key>@runheed.com/<number> \Sentry\init([ 'dsn' => getenv('RUNHEED_SENTRY_DSN'), 'environment' => getenv('APP_ENV') ?: 'production', 'release' => getenv('GIT_SHA') ?: null, ]); try { findInvoice($invoices, $id); } catch (\Throwable $e) { \Sentry\captureException($e); }3.Connect your agent, then sign in when it asks (other clients: /connect).
terminalbashclaude mcp add --transport http runheed https://runheed.com/api/mcp
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
- Exceptions you report with \Sentry\captureException($e)
- Uncaught exceptions and fatal errors (the SDK installs its handlers in init)
- Unhandled exceptions in Laravel, through sentry-laravel
What it does not do
- Tracing and profiling are accepted and dropped: 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
Connect Runheed first: Claude Code, Cursor or another client. Then see how the agent fixes and resolves an error.