How to get a daily production error digest from Claude Code
Connect Runheed as a claude.ai connector, then run /schedule in Claude Code and pick your repository and a morning time. Each run reads the last 24 hours of errors over MCP, opens the files in each stack trace and writes a short digest: what is new, what got worse, the likely cause and a suggested fix.
Why a scheduled task instead of an alert email
An alert says that something broke. A scheduled task runs in a cloud session with your repository checked out, so it can read the stack trace, open the file and line it points to, and say why it broke. You start the day with a short list of causes and suggested fixes instead of a pile of notifications.
Scheduled tasks (Claude Code calls them routines in places) run on Anthropic's cloud on a schedule you choose, and they use the connectors on your claude.ai account. Runheed's remote MCP server works as one of those connectors, so the task can call the same tools you use in a session.
Set it up
- Connect Runheed to your claude.ai account: open Runheed in Claude's connector directory (claude.ai/directory/connectors/runheed) and click Connect, or go to Customize > Connectors > Add custom connector and enter https://runheed.com/api/mcp. Sign in and click Allow.
- In Claude Code, run /schedule and describe the task, for example "/schedule daily production error digest at 8:07am". Claude asks which repository to use and confirms the schedule.
- Keep the Runheed connector on the task's connector list (every connected connector is included by default; remove the ones the digest does not need).
- Paste the prompt below as the task's instructions, then use Run now once to check the first digest.
Use the runheed connector to write today's production error digest.
1. Call runheed_get_trends with period 24h, runheed_get_recent, and
runheed_search_errors with status unresolved.
2. For each error that is new in the last 24 hours, or whose count went up, call
runheed_get_error and open the files in its stack trace in this repository.
3. Write the digest:
- One line per error: type, message, count, first seen, file:line.
- Likely cause in one or two sentences, quoting the code you read.
- Suggested fix (describe it; do not change files).
4. End with anything that looks like noise and could be ignored, but do not
ignore or resolve anything yourself.Picking a time a few minutes past the hour (8:07 rather than 8:00) helps the run start on time, since on-the-hour runs can start several minutes late.
Go further: drafted fixes and a Slack post
- Add a Slack connector to the task and end the prompt with "post the digest to #engineering", so the team sees it without opening Claude.
- Let it draft fixes: replace "do not change files" with "for the top error, write a failing test, fix it on a new branch and open a draft pull request". You review the pull request before anything merges.
- After a fix ships, ask in any session to resolve the error with the commit hash (runheed_resolve_error). If the error comes back, it reopens on its own and shows up in the next digest.
What the task can and cannot do
The Runheed tools only read errors or change an error's status (resolve, ignore, unignore), and every status change can be flipped back. They cannot touch your servers, deploys or billing. The prompt above tells the task not to change any status, so a digest run is read-only on the Runheed side.
Scheduled runs count toward your Claude plan's usage like an interactive session does. A daily digest is one run a day.
Questions
- Can I use a connector I added with claude mcp add?
- Not directly. Servers added with claude mcp add live on your machine, and scheduled tasks only see your claude.ai connectors (or a server declared in the repository's committed .mcp.json). Add Runheed as a claude.ai connector as shown above.
- Does the digest work without a repository?
- It can list and summarize errors from the connector alone, but the useful part, reading the code at the stack trace and naming the cause, needs the repository attached to the task.
- Can it run more than once a day?
- Yes. Pick hourly, or set a custom cron expression in the task's edit dialog. Claude Code rejects schedules more frequent than once an hour.
- Which error tracker data does it use?
- Whatever your apps report to Runheed through the Node or Python SDK, or by posting JSON to the ingest endpoint from any language.