Problem / motivation
Harnesses like Claude Code regularly prune or clean up older transcript files on disk. When agentsview sync reconciles provider roots and finds a file missing, it sets deletion_cause = 'source_missing' and populates deleted_at.
While AgentsView's local-first storage design intentionally preserves all messages, tool calls, and tokens in sessions.db, all standard CLI commands (session search, session list, session get, session messages) filter out records where deleted_at IS NOT NULL. This makes historical conversations invisible (from CLI and Web) even though the data remains intact in the SQLite archive.
Proposed solution
- CLI Flag (--include-deleted):
Add --include-deleted to agentsview session search and agentsview session list so CLI queries can optionally include tombstoned/soft-deleted sessions.
- Config Entry (preserve_missing_sources):
Add an optional setting in config.toml:
preserve_missing_sources = true
When enabled, reconciliation leaves missing files active instead of tagging them with source_missing tombstones.
Alternatives considered
No response
Problem / motivation
Harnesses like Claude Code regularly prune or clean up older transcript files on disk. When agentsview sync reconciles provider roots and finds a file missing, it sets deletion_cause = 'source_missing' and populates deleted_at.
While AgentsView's local-first storage design intentionally preserves all messages, tool calls, and tokens in sessions.db, all standard CLI commands (session search, session list, session get, session messages) filter out records where deleted_at IS NOT NULL. This makes historical conversations invisible (from CLI and Web) even though the data remains intact in the SQLite archive.
Proposed solution
Add --include-deleted to agentsview session search and agentsview session list so CLI queries can optionally include tombstoned/soft-deleted sessions.
Add an optional setting in config.toml:
Alternatives considered
No response