# Qoder

> Import Qoder CLI, app, IDE, Work, and Cloud Agents histories and memories.

Hansard imports Qoder's native local histories and explicitly requested Cloud
Agents sessions. Each surface retains its own source label.

## Source IDs

| Source        | Use it for                                                            |
| ------------- | --------------------------------------------------------------------- |
| `qoder`       | CLI JSONL, Qoder app and IDE databases, and QoderWork history.        |
| `qoder-cloud` | Cloud Agents sessions, thread histories, files, and current memories. |

## How the import works

Qoder CLI and QoderWork retain native transcripts under their configuration
homes. The desktop applications also keep message copies in SQLite.
Hansard reads coherent database snapshots and merges overlapping messages by
their recorded identities, keeping voice-only messages and other app-only
history. Fork-inherited messages remain in the raw archive without adding
duplicate activity. The app's migration ledger can identify copied IDE or Work
history: Hansard checks the recorded prefix hash before excluding that copy
and keeps subsequent continuation under its new session identity.

Cloud Agents import follows the public API's pagination and reads coordinator
and child threads separately. Event references also recover archived advisor
threads that are absent from the normal listing. Event boundaries are checked
before and after download, so a changing history waits for a later retry.
Downloadable files are preserved when available. The API reports cumulative
credits, but does not expose inference token counts or reasoning bodies;
Hansard retains that billing metadata without assigning an invented model or
converting credits to token counts or dollars.

## Import and keep current

**Conversation history**

```sh
hansard import --source qoder --since all
hansard config sources enable qoder
hansard import qoder-cloud
```

Cloud import uses `QODER_ACCESS_TOKEN`, a Qoder PAT or SAT. Select one cloud
session and its referenced memory stores with `--session <session-id>`. Cloud
requests read existing histories and never start agents. Turn on **Qoder cloud
agents** in **Settings → Imports → Cloud agents** to have the watcher refresh
them every six hours.

The default local roots include `~/.qoder`, `~/.qoder-cn`, `~/.qoderwork`,
and `~/.qoderwork-cn`, plus installed app databases. `HANSARD_QODER_ROOTS`
overrides transcript homes. `HANSARD_QODER_APP_DATABASES`,
`HANSARD_QODER_IDE_DATABASES`, `HANSARD_QODER_WORK_DATABASES`, and
`HANSARD_QODER_MIGRATION_DATABASES` override database paths. Each accepts a
path-separated list. Native CLI configuration-directory overrides are also
respected.

**Memories and instructions**

```sh
hansard memory backup
hansard import qoder-cloud
```

Local backup includes `AGENTS.md`, local instructions, rules, commands, agent
Markdown, user and project auto memory, QoderWork awareness files, and
read-only IDE memory records. Skill folders are not memories and are not backed
up. Cloud import snapshots current memory entries
after checking their provider-recorded sizes and hashes. Full cloud import
includes accessible memory stores; selecting one session limits this backup
to its referenced stores. Manage cloud and IDE memories in Qoder.

## Review the import in the app

1. When the import finishes, open **Conversations** and select **Filter & sort**.
2. Set **Source** to **Qoder** 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.

Check tool arguments, results, numbered edits, and child-session links. In
Stats, compare recorded models and tokens with the provider's available
fields. Open Memories to inspect instruction snapshots and project scopes.

## What Hansard preserves

- Native messages, readable reasoning, tool arguments, results, and attachments.
- Delegated histories, explicit team membership, and scheduled-job classification.
- Recorded models and usage, with credits retained separately.
- Verified app edit patches and migration source details.
- Native session sidecars, history-only SQLite copies, and cloud API pages.
- Downloadable cloud files and current provider memories.

## Known limitations

- Authenticated native model calls, live IDE edits, and Cloud Agents account
  access remain pending verification. Synthetic tests cover native formats,
  API pagination, thread separation, downloads, and memory integrity.
- Hosted Qoder requests can hide token counters. Desktop and cloud model
  selections are configuration, not proof of the model used for each request.
- An app patch that cannot be matched to one edit remains in session metadata.
  It does not add synthetic tool calls or repeat aggregate line counts.
- SDK histories without an explicit automation or delegation marker cannot
  reliably be classified as machine activity.
- Missing migration ledgers or unmatched prefix hashes cannot establish copied
  history. Such histories remain separate, with an import error for a mismatch.
- Private encrypted state segments remain raw-only. Database settings,
  credentials, connection configuration, and signed download links are excluded.
- Path-only desktop attachments remain references; inline bytes and pasted
  context are preserved as archive attachments.
- Missing or expired cloud files remain references with a warning. External
  image URLs are retained as URLs. Earlier cloud memory versions are not fetched.
- QoderWake's daemon databases, remote collaboration caches, and unaudited
  regional desktop variants are outside these readers.

## Refresh an existing archive

```sh
hansard import --source qoder --since all
hansard import qoder-cloud
hansard memory backup
```

Retain the original stores for parser refreshes. Local CLI sessions offer a
resume command using the recorded native ID and configuration home.

Official references: [CLI memory](https://docs.qoder.com/cli/memory),
[app data import](https://docs.qoder.com/qoder/data-import), and
[Cloud Agents events](https://docs.qoder.com/cloud-agents/api/sessions/events/list).
