# Route traces

A trace is the record of one routing decision. The same trace appears in the picker, in Settings, on the command line and in the MCP tools.

## Reading a trace

<pre class="trace">Slack → ✂ utm_source → rule 2 "Linear" → @work → Chrome · Work ▸</pre>

Each step between the arrows is one thing that happened, in order. The trace always starts with where the link came from.

| Symbol | Step | Example | Meaning |
| --- | --- | --- | --- |
| | Received | `Slack` | The app the link was clicked in |
| `↪` | Unwrapped | `unwrapped google.com` | A redirect wrapper was removed |
| `✂` | Cleaned | `✂ utm_source` | Tracking parameters were cut |
| | Matched | `rule 2 "Linear"` | This rule matched |
| `!` | Skipped | `! rule 3 invalid: unknown intent @wrok` | A broken rule was passed over |
| | No match | `no rule matched (0 of 7)` | Nothing matched; the fallback was used |
| | Resolved | `@work → Chrome · Work` | What the intent means on this device |
| `?` | Unbound | `? @meeting has no binding on this Mac` | The intent has nowhere to go here |
| `▸` | Launched | `▸` | It opened |
| `×` | Failed | `× Chrome is not installed` | It couldn't open; the picker took over |

Every step has a symbol *and* words. Nothing depends on colour.

## Where the link came from

On macOS, Ferry reads the sending app from the system event that delivers the link, so the source is exact.

| You see | Meaning |
| --- | --- |
| `Slack` | Known for certain |
| `unknown app` | No source was available |
| `CLI`, `URL scheme` | The link came from the `ferry` command or a `ferry://` link |
| `MCP: Claude` | An AI agent opened it; the name is the one the agent reported |

A link opened with `open` in Terminal reports Terminal. That is correct, not a bug.

## One function, one answer

The picker, **Test a link**, `ferry explain` and the agent tool `explain_route` don't each have their own idea of how routing works. They all call the same function the real click calls, with a flag that says "don't actually open anything".

So when a link goes somewhere you didn't expect, the trace is not a guess about what happened. It is what happened.

## Dry runs

A dry run ends with `(dry run)` instead of `▸`:

<pre class="trace">CLI → rule 1 "Zoom calls" → @meeting → zoom.us app (dry run)</pre>

Dry runs open nothing, write nothing to history, and don't count against the agent rate limit.

## Long traces

The one-line form fits in 80 characters. A longer trace folds its middle:

<pre class="trace">Slack → … +2 steps → rule 2 "Linear" → @work → Chrome · Work ▸</pre>

The full list of steps is always available: as rows in Settings, and as JSON from the command line.

## As JSON

```bash
ferry explain "https://linear.app/acme/issue/APP-142" --json
```

The output follows the `ferry.trace.v1` schema: the request, every step with its kind, symbol and label, the resolved target, and the outcome (`opened`, `picker`, `failed` or `dismissed`). MCP clients can read the schema itself at `ferry://schema/trace`.

## History

History is **off** unless you turn it on in **Settings › Advanced**. When on, Ferry keeps the last 1,000 traces in `history.jsonl` next to your config, and the menu bar lists recent links.
