Sessions and streams
An agent execution run is a session. Its real-time, append-only log is a stream.
Cards records every session on disk and streams the active output to your editor.
On-Disk Persistence
All streams are saved directly in the card repository:
- Path:
streams/{streamType}/{filename}.jsonl - Naming:
{filename}follows the pattern{uuid}-{agentId}.jsonl(e.g.,01906a5a-4b03-4924-b6c7-56035d6000bd-claude.jsonl). - Metadata: A sibling
{filename}.meta.jsonfile stores the stream's state:{ "title": "Fixing type errors in database schema", "sessionId": "01906a5a-4b03-4924-b6c7-56035d6000bd", "taskContent": "Run typecheck and fix any errors under packages/db", "slug": "fixing-type-errors", "lineCount": 142, "createdAt": "2026-06-29T16:30:00.000Z", "isActive": true }
Live Streaming
Cards watches the streams/ directory. When an agent writes to a .jsonl file, Cards:
- Reads the new bytes appended since the last update.
- Streams each completed line to your editor in real time.
- Parses the output for a
slugortaskContent. - Updates the
lineCountand metadata in the.meta.jsonsidecar.
If the stream is new (uncommitted), Cards opens a live tab in the editor. When the agent exits, the live tab finalizes.
Versioning and Checkpoints
To ensure your session history is preserved:
- Pre-commit: Cards automatically stages all local stream files before any commit.
- Post-commit: Cards commits the active stream and its metadata into the card repository using the message format
Checkpoint stream: {sessionId}.jsonl (workspace {sha}).
Limitations
Streams are append-only. Manually editing a
.jsonlfile can corrupt the line count and offset cursors, causing Cards to miss new lines or desynchronize.
Attribution and version control
How Cards attributes changes to users, agents, or the system, and how the attribution tree projects a card's commits onto your active worktree.
Configuration, rules, and scopes
How Cards loads, merges, and overrides configuration layers, and the complete set of settings you can edit across project and user boundaries.