Sessions & Threads
reza tracks work across tools, context limits, and time. Every AI session is linked into a unified thread.
Cross-Tool Threads — The Killer Feature
Work moves between tools. You start in Cursor, continue in Claude Code when it gets complex, hand off to Codex when Claude hits its context limit, then come back to Cursor for the frontend. reza treats all of that as one logical thread — not four disconnected sessions.
Thread: "jwt-auth-thread"
├── cursor-abc Cursor 09:00 completed
├── claude-def Claude Code 11:30 interrupted ← context limit hit here
├── codex-ghi Codex 14:00 interrupted
└── cursor-jkl Cursor 15:22 active ← you are here
reza session handoff --budget 8000
# → Full conversation history across ALL four tools, budget-truncated, ready to pasteOne-time setup
# Register all tools you have installed:
reza install-hooks
# Start a session (reza links subsequent sessions automatically):
reza session start --llm cursor --task "JWT auth"After that — nothing. Every tool's conversation is saved automatically as you work.
How auto-sync works per tool
| Tool | Sync method |
|---|---|
| Claude Code | Stop hook — fires after every response, zero tokens |
| Aider | File-watch on .aider.chat.history.md — near-instant |
| Codex CLI | File-watch on ~/.codex/conversations/ or reza sync-codex for rollouts under ~/.codex/sessions/ |
| Cursor | reza sync-cursor for agent JSONL under ~/.cursor/projects/… or drop exports in .reza/handoffs/ (ingested by reza watch) |
| Kilocode | Drop .reza/handoffs/export.json — auto-ingested |
| Codex Desktop | Drop .reza/handoffs/export.json — auto-ingested |
For GUI tools where you do not use the CLI transcript paths, export the chat once and drop it in .reza/handoffs/ — reza watch ingests it automatically.
Bulk import: Cursor & Codex on-disk transcripts
If you use Cursor or Codex from the terminal, reza can pull existing agent transcripts into .reza/context.db in one shot. Re-running is safe: only new turns are appended.
reza sync-cursor # Cursor agent JSONL under ~/.cursor/projects/
reza sync-codex # Codex rollout JSONL under ~/.codex/sessions/Use reza session list to see imported rows (with source_tool), and reza session graph <id> to map a session to files and graph nodes. In the VS Code extension’s graph view, open the Sessions strip to highlight or isolate the subgraph for a selected session.
Thread linking — three modes
reza links sessions into threads automatically. You can also control it explicitly:
# Auto (reza detects same task, < 2hr gap) — silent, just works
reza session start --llm claude --task "JWT auth"
# → [reza] Continuing thread: jwt-auth-thread
# Semi-auto (longer gap or ambiguous) — one prompt
reza session start --llm codex --task "JWT refresh tokens"
# → Continue thread 'jwt-auth-thread'? [Y/n]
# Explicit — you decide
reza session start --llm cursor --task "JWT auth" --continue # link to recent thread
reza session start --llm cursor --task "unrelated work" # new threadFull cross-tool handoff
reza session handoff # full thread, all tools
reza session handoff --budget 8000 # token-budget-aware truncation
reza session handoff --session-only # single session only (old behavior)
reza session handoff --format json # machine-readable
# Search across the entire thread:
reza session search "JWT"
reza session search "circular import" --id claude-abc12345