# Devin

> Import Devin for Terminal and Devin Desktop sessions, and Devin cloud sessions from the browser extension or the Devin API.

Devin for Terminal and Devin Desktop keep detailed local records. Import the
local sources for full tool and usage detail. For cloud sessions, the Hansard
browser extension captures the session history shown on app.devin.ai, and the
cloud source adds pull request links from the Devin API.

## Source IDs

| Source          | Use it for                                                                                                                      |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `devin-cli`     | Devin for Terminal sessions from `~/.local/share/devin/cli/sessions.db`.                                                        |
| `devin-desktop` | Devin Desktop ACP message stores, and event logs from older builds.                                                             |
| `devin-cloud`   | Devin cloud sessions, read from the Devin API. Runs when you ask for it or turn it on in **Settings → Imports → Cloud agents**. |

## How the import works

The terminal source reads Devin's local session database and rebuilds each
conversation by following its ordered messages and branches. The desktop source
reads a snapshot copy of each ACP message store the app keeps in
`User/acp-messages`, or the ACP event logs of older builds, in their original
order. Both keep user and assistant messages, tool calls with their full
inputs, modes, usage, and project details when Devin recorded them, and both
keep branches and sessions separate from each other. Desktop copies of cloud
sessions keep the cloud machine's working directory as a remote path.

The browser extension reads a cloud session's full event history from a
signed-in app.devin.ai tab: messages, thinking, shell commands with Devin's
truncated output, file edit targets, searches, computer actions, plans,
attachments, and screen recordings. Enable **Devin** in the extension's capture
settings; see the extension setup under `hansard help browser`.

A cloud session or Ask Devin conversation belongs to a repository when its
evidence names exactly one. Hansard reads, in order: the repositories the
session was started on, its pull requests, repository fields in Devin's tool
records, and a repository the session cloned and then worked in. The first kind
a session has decides. A session whose evidence names several repositories
stays under **Devin cloud**, and a repository Devin names as `owner/repo` is
read as a GitHub repository.

One cloud session is one archive session, whichever source saw it first. A
Desktop copy keeps or takes over the transcript only when it has at least as
many turns and reaches at least as late as the archived one, is not marked
truncated, and holds no records Hansard cannot read; files and raw responses
from a browser capture stay with the session either way.

A Devin CLI session that Devin Desktop also shows is one archive session too.
The Devin CLI record keeps the transcript, since it holds the prompt and turns
the Desktop copy omits, and the Desktop store is kept with its raw sources.

The cloud source reads the Devin API for cloud-only sessions and their
repository and pull request details. When Devin Desktop already mirrors a cloud
session, Hansard keeps the local transcript and adds the cloud details to it. A
cloud-only session imports as a chat transcript. The API does not return tool
calls, shell commands, models, or token counts, so Hansard leaves those empty
instead of estimating them. Importing again updates the same sessions.

## Import and keep current

**Import now**

```sh
hansard import --sources devin-cli,devin-desktop --since all
hansard import devin-cloud --since all
hansard index rebuild
```

`devin-cloud` uses `DEVIN_API_KEY` or `devin.apiKey` in Hansard's config. It
only reads from Devin. Without a key, it prints setup instructions instead of
failing.

**Keep current**

With **Automatic** source selection, the watcher already includes
`devin-cli` and `devin-desktop`. With a **Custom** list, enable them.
The watcher picks them up within 30 seconds:

```sh
hansard config sources enable devin-cli,devin-desktop
```

To keep cloud sessions current, turn on **Devin** in **Settings → Imports →
Cloud agents**. The watcher then refreshes it every six hours. Otherwise, run
the command again when you want newer cloud sessions.

## Review the import in the app

1. When the import finishes, open **Conversations** and select **Filter & sort**.
2. Set **Source** to **Devin CLI or Devin Desktop** and set **Time** to the window you imported. Use **Folder** to narrow the list when you use this harness in several projects.
3. Select a conversation to check its messages, tool calls, files, commits, model, and token usage.

To keep archiving new sessions from a local harness, open **Settings → Imports**. **Automatic** follows every supported harness installed on this computer. **Custom** lets you turn individual harnesses on or off. Cloud sources and account exports never run from here; each needs its own import command. If a conversation you expect is missing after you reset the filters, run the import command on this page again with `--explain-skips` where the source supports it.

Choose **Devin cloud** under **Source** to list cloud sessions from every
surface: API imports, browser captures, Ask Devin conversations, and cloud
sessions that Devin Desktop mirrored. **Devin Desktop** and **Devin CLI** list
only sessions that ran on this computer. The same source names work with
`hansard history --provider` and search.

## What Hansard preserves

- Devin for Terminal branches, tool calls, usage, working directories, linked
  subagents, selected model, backend, and agent mode.
- Devin Desktop plans, modes, thinking, tool activity with full inputs, usage,
  and workspace details from its ordered records.
- Browser-captured cloud history, attachments, and screen recordings, joined
  with Desktop and API copies of the same session. Child sessions link to the
  session that started them.
- Browser-captured Ask Devin conversations: each question, the answer's
  thinking, codebase searches with the files they scanned, and cited file
  ranges.
- Cloud chat, status, repository and pull request details from the Devin API
  for sessions no other source holds.
- What Devin reports about a cloud session, from every source that saw it, in
  **Devin details** in the conversation's **Details** panel: status, start and end times, and outcome;
  ACU usage, limits, and overage charges; pull request titles, branches, and
  line counts; the branch Ask Devin searched; Devin's own category; playbook
  and workflow details; and links to the parent, child, and Ask Devin sessions
  it names. When sources disagree, the most recently reported value of each
  detail is shown. ACUs are Devin's billing unit, not token usage, and pull
  request line counts describe the pull request, not edits made in the session.
- An allowlisted copy of each Desktop cloud session's info, kept with its raw
  sources. Upload links, organization permissions, and the author's email and
  message are left out, and the shared state database is never copied.

## Known limitations

- Legacy Devin Desktop logs keep message order and session start and end, but
  not an exact time for each message. Hansard hides the ordering times it
  assigns.
- A Desktop store that changes while it is read, uses an unknown schema, or
  holds an unreadable record is reported as an import error and read again on
  the next run.
- Devin records no token counts for cloud sessions in any source, so cloud
  sessions have no cost. ACU usage is kept as session metadata. The model is
  the Devin version the session records, such as `devin-swe-2-high`, shown as
  SWE-2 with High effort; a version name Hansard does not recognize is shown as
  recorded. Sessions imported before the Devin version, repositories, and
  session details were read need `hansard import --sources devin-desktop --since all`
  and a **Rescan all history** in the browser extension.
- A session an Ask Devin answer started links to that conversation when either
  side recorded the link: the session names the Ask Devin query, or the answer
  names the session it started.
- The browser extension does not download edited file contents, screenshots,
  or full terminal logs, which Devin keeps in signed storage.
- Ask Devin records no time for individual questions, so only the first
  question and the last answer in a conversation carry one. The full contents
  of files an answer read stay in the preserved raw capture.
- In the source build of the extension, attachments and screen recordings
  that Devin serves through a redirect are downloaded through the signed-in
  tab under normal browser CORS rules. Each
  download stores 1 MiB checkpoints and can resume after browser restart when
  the server supplies byte ranges, a matching strong ETag, and a total size.
  Other downloads restart safely after the tab closes. Files are limited to
  100 MiB each, 500 MiB per conversation, and 512 MiB of queued file bytes.
  Repeated acquisition failures retain an unavailable descriptor with a reason.
  Signed-in acceptance of this download path remains pending.
- Desktop selected model settings are retained separately from generation
  metadata. A recorded Devin version applies to the whole session and does not
  identify each underlying model used by Adaptive or Fusion. Reimport
  `devin-desktop` to refresh this distinction in older archives.
- Existing-history trials on 2026-10-08 imported one CLI session and ten Desktop
  records into ten merged archive sessions. Repeat imports preserved transcript
  bytes. These trials do not verify automatic capture of a new turn.
- Current native CLI captures can lack the snapshot identity needed for raw
  replay. Desktop message stores have no raw replay entry point; preserve the
  provider history for reimport. Captures that Devin Desktop enriched do not
  replay, and earlier captures that lack the needed evidence need a fresh
  capture.
- Cloud API and Ask Devin native acceptance require an authenticated account.
  Repository and branch context and query-to-agent links have fixture coverage,
  but their signed-in native comparison remains pending.
- Cloud sessions that started in Devin for Terminal are skipped, because the
  local database already has the full record. To import them anyway, run
  `hansard config set imports.devinCloud.includeOrigins '["cli"]'`.

## Refresh an existing archive

```sh
hansard import --sources devin-cli,devin-desktop --since all
hansard index rebuild
```

To refresh cloud sessions too, run `hansard import devin-cloud --since all`.

After an update, the watcher refreshes most archived conversations on its own,
but it leaves Devin CLI sessions kept as a SQLite snapshot as they are. The
import above reads them again from the Devin CLI's history. If that history is
gone, rebuild the snapshots that carry the identity replay needs from
Hansard's preserved copy:

```sh
hansard rebuild --from-raw --source-type devin-cli-history --since all
```

To rebuild Devin cloud and Ask Devin browser captures from the archive without
a browser, run:

```sh
hansard rebuild --from-raw --source-type devin-cloud-browser
hansard rebuild --from-raw --source-type devin-ask-browser
```
