---
title: "Fixes you hand to your AI tool"
description: "Every finding carries a written fix. Copy it into the AI tool in your project and let the agent change the code."
source: "https://getloggerhead.com/docs/telemetry-linting/one-click-fixes/"
---

# Fixes you hand to your AI tool

> Every finding carries a written fix. Copy it into the AI tool in your project and let the agent change the code.

Every finding on the **Linting** page carries two things: a short recommendation in plain words, and one action
button. The recommendation is the fix. It names the service, the field, or the metric, and it says what to change.

## The workflow

1. Open **Linting** or **AI analysis** and read a finding.
2. Click **Copy prompt** on the card. The prompt holds the facts of the finding and the recommendation.
3. Paste it into the AI coding tool that has your project open: Claude Code, Cursor, Codex, or Windsurf.
4. Let the agent change your logger, your instrumentation, or your collector config.
5. Loggerhead checks again on the next cycle. The finding clears when the telemetry changes.

The agent already has your source. Loggerhead has the evidence from the running app. The recommendation joins the two,
so the agent edits the right file instead of guessing.

:::tip[Let the agent read every finding itself]
Your AI tool can call the [MCP server](/docs/mcp-server/what-the-server-exposes/) and read the findings directly. Click
**Copy agent prompt** at the top of the Linting page or the AI analysis page, and paste the prompt into your AI tool.
The prompt tells the agent to read the lint findings with `query_improvements`, the AI findings with
`query_ai_findings`, fix the real problems, and check each fix.
:::

## The action buttons

| Action | What it does | Status |
| --- | --- | --- |
| Create alert | Creates an alert rule for the service and the condition in the finding. | Works today |
| Add drop rule | Prepares a drop rule for the noisy line or the label. | Planned |
| Add sampling | Prepares a sampling rule for the low-signal logs. | Planned |
| Add redaction | Prepares a redaction rule for the sensitive field. | Planned |
| Add trace context | Shows the error logs that have no trace ID, so you can find the logger to change. | Guidance |
| Review | Shows the records that break the rule. | Guidance |

## Review a finding

Click **Review** on a finding to see the records that break the rule. On a card that groups findings, click
**Review** to show the members, then click **Review** on one member.

The review window shows the newest 25 records of the last hour and the count of all the matches:

- For a log rule, each row is one log record. Click a row to see its attributes and its trace ID.
- For a trace rule, each row is one span. Click the arrow on a row to open its trace.
- For a metric rule, each row is one series: the metric name, the labels, and the last value.

Under the title, **Looks at** names the metrics, the attribute keys, and the spans that the finding is about. Under
each log record, the window shows the attribute keys of the record. When a rule finds records with a different
shape, such as records with no fields or records without a field that the others carry, compare these keys.

The AI analysis page uses the same window. The model names its evidence: the services, the metrics, the log lines,
the spans, and the trace IDs. The window shows those records, from the time window of the analysis. When
Loggerhead cannot find the exact lines, it shows recent records of the services that the model named, and says so.

Click **Open in Logs** to open the Logs page with the service filter of the finding. When no record matches, the
problem stopped after the last check, and the finding clears at the next check.

## Why a rule belongs in your project

Loggerhead does not change your app or your collector config. A drop, sample, or redact rule belongs on the branch
that sends the data, or in your app's logger. That file is in your repository, where your AI tool can edit it and
where the change goes through review with the rest of your code.

:::note[Loopback data stays yours]
No fix sends data anywhere. The recommendation is text on your Mac. You choose what to paste and where.
:::
