Import AI session history
Import AI session history
Execution note: Commands on this page beyond installation and bootstrap are operational detail for your agent or an advanced operator. If you are working through an agent, describe the outcome you want; the agent should explain material changes, request any needed approval, and report evidence when it finishes.
First time using AIWG? Begin with Install, Connect, and Verify. This guide assumes AIWG is already installed and connected to this project.
Use the session catalog when you want one privacy-aware timeline across multiple AI providers.
From the project root, preview discovery first:
aiwg sessions discover --workspace "$PWD" --dry-run
Claude, Cursor, and Factory histories are discovered only below workspace-keyed provider roots. Codex keeps sessions in a shared root, so authorize it explicitly:
aiwg sessions discover \
--workspace "$PWD" \
--codex-root ~/.codex/sessions \
--json
The command reports every provider, including unavailable and manual-export providers, and saves an immutable manifest unless `--dry-run` is present. Review it, preview the exact batch, then confirm:
aiwg sessions import-discovered --workspace "$PWD" --dry-run
aiwg sessions import-discovered --workspace "$PWD" --confirm
For non-interactive automation, `--yes` is equivalent to `--confirm`. Imports are resumable and idempotent:
aiwg sessions import-discovered --workspace "$PWD" --resume --yes
Read commands infer an unambiguous current project, so the normal follow-up is:
aiwg sessions list
aiwg sessions timeline --gap 30m
aiwg sessions search "decision" --control-events exclude
Both list and timeline report whether coverage is complete, partial, stale, or unknown. Use `--min-coverage 0.95` when an audit should fail below a threshold. If inference reports multiple workspace candidates, rerun with the exact `--workspace` shown in the diagnostic.
The catalog contains normalized AIWG copies. Discovery and import never modify provider histories, and source paths are redacted from public command output. Use `aiwg sessions --help` for the complete command and JSON contracts.