---
title: "Agent traces and Work Map"
description: "Install the separately built ahtraces companion, choose what it may process or sync, and inspect work across 19 supported coding agents in Autohand Console."
sidebar:
  label: "Agent Traces"
seo:
  title: "Agent Traces and Work Map"
---

## Availability

Official release archives, `install.sh`, `install.ps1`, and Homebrew install `ahtraces` next to the main Autohand Code binary. The companion has its own private source repository, tests, build, and executable; the Autohand release process builds both products separately and bundles the matching binaries.

The companion is disabled by default. It does not monitor session files until you make an explicit consent choice. Local Work Map processing is available after consent. Cloud trace sync and Console visibility are included with paid Autohand Code plans, including Team.

:::tip
**No model quota charge:** trace ingestion and storage does not count against Autohand API usage.
:::

## Install or upgrade both binaries [#install]

Use an official installer so the release-matched `autohand` and `ahtraces` executables are installed together.

### macOS or Linux

```bash
curl -fsSL https://autohand.ai/install.sh | sh
```

### Windows PowerShell

```powershell
iwr -useb https://autohand.ai/install.ps1 | iex
```

### Homebrew

```bash
brew install autohandai/code/autohand-code
# Existing installation:
brew upgrade autohandai/code/autohand-code
```

### npm

```bash
npm install -g autohand-cli
```

The npm postinstall downloads the matching `ahtraces` binary from the same Autohand GitHub Release and verifies its SHA-256 checksum before exposing the `ahtraces` command. Set `AUTOHAND_SKIP_AHTRACES_INSTALL=1` only when you intentionally want an installation without the trace companion; npm's `--ignore-scripts` option also skips the download.

```bash
AUTOHAND_SKIP_AHTRACES_INSTALL=1 npm install -g autohand-cli
```

Confirm both commands resolve:

```bash
autohand --version
ahtraces --version
```

## Choose a consent mode [#consent]

New users choose during onboarding. Existing users are prompted once after upgrading to a consent-aware release. Cancelling leaves tracing off. Open `/settings` later to change between the four modes.

| Mode | On this device | In Autohand Console |
| --- | --- | --- |
| **Disabled** | The monitor is stopped and derived local trace data is removed. | Nothing is uploaded. |
| **Local Work Map only** | Known session stores are read and reduced to aggregate signals. | Nothing is uploaded. |
| **Cloud sync — metadata only** | Monitoring and Work Map stay on. | Pseudonymous timing, harness, model, provider, reasoning, token, relationship, and outcome metadata is synced. |
| **Cloud sync — redacted full traces** | Monitoring and Work Map stay on. | Metadata plus bounded, redacted prompts, responses, reasoning, and tool parts can be synced. |

`autohand --traces-on`, `autohand traces on`, `ah traces on`, and `ahtraces on` select metadata only cloud sync. Redacted full traces require the separate explicit choice in `/settings`.

### Trace settings [#trace-settings]

Each consent choice writes these keys under `traces` in your Autohand config file:

| Key | Default | Meaning |
| --- | --- | --- |
| `traces.enabled` | `false` | Master switch for local session monitoring and the Work Map. Turning it off stops the companion and removes derived local Work Map and checkpoint data |
| `traces.cloudSync` | `false` | Upload normalized traces to your signed-in Autohand account. Turning it off leaves local Work Map processing on while `traces.enabled` stays `true` |
| `traces.contentMode` | `"metadata"` | `"metadata"` sends no message content; `"full"` adds bounded, redacted messages and parts and requires the separate explicit choice |
| `traces.discoveryMap` | `true` | Allows the Work Map commands and the agent's `inspect_work_map` tool to read the local aggregate. Has no effect while `traces.enabled` is `false` |
| `traces.consentVersion` | Not set | Written when you complete a consent choice. If it is missing or older than the current consent notice, the companion and Work Map do not run, even when a legacy config says `traces.enabled: true` |

| Mode | `enabled` | `cloudSync` | `contentMode` | `discoveryMap` |
| --- | --- | --- | --- | --- |
| Disabled | `false` | `false` | `"metadata"` | `false` |
| Local Work Map only | `true` | `false` | `"metadata"` | `true` |
| Cloud sync — metadata only | `true` | `true` | `"metadata"` | `true` |
| Cloud sync — redacted full traces | `true` | `true` | `"full"` | `true` |

Changing a trace setting through `/settings` or `autohand config set` takes effect immediately. Set `traces.discoveryMap` to `false` to block Work Map access while keeping monitoring available for a chosen cloud mode.

### What cloud sync uploads [#cloud-payload]

Uploads are incremental, with at most 50 traces and 4 MiB per request. Each request carries schema version 1 and your pseudonymous device ID; your sign-in associates accepted traces with your account.

- **Metadata mode** sends the canonical trace ID, hashed native ID and source fingerprint, harness and agent version, timestamps and status, model, provider, reasoning effort and context window, token usage, relationships, and derived outcome facts. It sends no project metadata and no messages.
- **Full mode** adds normalized messages and parts. Before upload, IDs are made opaque, common credential patterns and secret-named fields are redacted, home paths are replaced, strings and nesting are bounded, message content is limited to 1 MiB, and each serialized trace is capped at 3 MiB.

:::warning
Full-mode redaction is defense in depth, not a guarantee. Source code, personal data, or an unrecognized secret format can remain in uploaded content.
:::

## Start, inspect, and stop the monitor [#commands]

```bash
autohand --traces-on
autohand --traces-off

autohand traces status
autohand traces on
autohand traces off
autohand traces stop

ah traces status
ah traces on
ah traces off
ah traces stop

ahtraces status
ahtraces on
ahtraces off
ahtraces stop
```

| Control | Behavior |
| --- | --- |
| `status` | Reports whether the managed companion is running. |
| `on` | Stores consent for metadata sync and starts the companion. |
| `off` | Disables monitoring and sync, stops the companion, and removes derived local trace data. |
| `stop` | Stops the current daemon without changing consent. A later Autohand startup can start it again. |

The `autohand`, `autohand-code`, and `ah` aliases expose the same `traces` subcommand.

## 19 supported coding agents [#supported-agents]

The read-only adapters inspect bounded, known locations for these harnesses. Agents that are not installed are skipped.

1. Autohand
2. Claude Code
3. Cursor
4. OpenCode
5. OpenCode 2
6. Codex
7. Pi
8. Amp
9. GitHub Copilot
10. Cline
11. OpenClaw
12. Hermes
13. Droid
14. Grok
15. Kimi Code
16. Antigravity
17. Prime Agent
18. fx
19. DeepSeek Harness

Supported native formats include JSON, JSONL, SQLite, and compressed JSONL. The normalized trace schema records available agent, model, usage, relationship, outcome, and verification fields.

## Inspect the local Work Map [#work-map]

A Work Map scan reads local data and makes no network request.

```bash
autohand discovery map --since 30d
autohand discovery map --agent autohand,codex --json
```

The aggregate includes sessions, duration, token provenance, harness, model, provider, reasoning effort, tool categories, workflow motifs, outcomes, verification evidence, relationships, repository counts, and bounded recommendations.

It excludes prompts, responses, reasoning, commands, tool arguments and results, code and diffs, file paths, repository identities, session IDs, credentials, and environment values.

| Option | Behavior |
| --- | --- |
| `--since <duration>` | Lookback window such as `30d`, `24h`, or `60m`. Default `30d` |
| `--agent <id,id>` | Limit the scan to specific harnesses, such as `autohand,codex` |
| `--workspace <path>` | Workspace to scope the map to. Defaults to the current directory |
| `--json` | Print the aggregate as JSON instead of the rendered summary |
| `--output <path>` | Also write the aggregate JSON to a file |

Under the hood, Autohand runs `ahtraces map --json` and validates the complete output against a strict aggregate schema that rejects unknown keys, so the companion cannot pass prompts, responses, paths, or credentials into the CLI or agent context. The agent's `inspect_work_map` tool reads the same aggregate. Both require local monitoring to be on (`traces.enabled: true` with current consent) and `traces.discoveryMap` not set to `false`.

## View traces in Autohand Console [#console]

1. Sign in from the CLI with `autohand login` or `/login`.
2. Enable metadata sync with `autohand --traces-on`.
3. Run sessions in Autohand or another supported coding agent.
4. Open [console.autohand.ai/traces](https://console.autohand.ai/traces).
5. For a Team plan, select the intended Team account in the account switcher.

The Traces page shows account-scoped session traces and a cross-agent summary by harness, model, provider, and reasoning effort. Upload is incremental, so a new or updated session may take a short time to appear.

## Delete cloud trace data [#delete]

Turning monitoring off stops future sync and removes Autohand's derived local data. It does not remove data already uploaded.

1. Open [Account in Autohand Console](https://console.autohand.ai/account).
2. Find **Agent trace data**.
3. Select **Delete agent trace data**.
4. Type `DELETE TRACES` and confirm.

The action permanently removes trace metadata and any full trace content uploaded by your identity to the selected account. Other Team members' traces and the source session files owned by coding agents on your device remain. Future traces continue to sync while monitoring stays on.

## Troubleshooting

|  |  |
| --- | --- |
| `ahtraces` is missing | Upgrade with `install.sh`, `install.ps1`, Homebrew, or the matching release archive. Package-manager-only installations may not contain the separately built companion. |
| The monitor is not running | Run `ahtraces status`, then `autohand traces on`. Use `autohand traces stop` only for a temporary stop. |
| Local Work Map works but Console is empty | Confirm you chose metadata or full cloud sync, are signed in, and selected the expected personal or Team account in Console. |
| Old cloud data remains after turning traces off | Use the separate **Delete agent trace data** control on the Console Account page. |
