You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running contextspectre without arguments opens the interactive TUI.
Session browser - sessions sorted by last modified with responsive columns that adapt to terminal width. Three breakpoints: wide (>160 cols), medium (120-160), narrow (<120). Columns: project, slug, session ID, branch, messages, size, context %, compaction count, signal grade, cost, modified time. Active sessions show a ● indicator. Press s to cycle sort column (modified → cost → context → signal → size). Press / to search.
Detail view - drill into a session with four tabbed panels: Overview, Messages, Cleanup, Ghost. Switch panels with Tab or 1-4. Overview shows stats, cost, compactions, decision economics, and vector gauge. Messages panel shows every entry with type, tokens, timestamp, and preview. Cleanup panel shows noise breakdown. Ghost panel shows stale compaction references.
Messages panel - context meter at the top shows current usage, compaction history (capped at 3 with overflow hint), ghost file references (capped at 3), and estimated turns remaining. Entries are labeled by type: stale reads, failed retries, sidechains, tangents. Space to select individual messages. Bulk selectors: x progress, h snapshots, r stale reads, c sidechains, g tangents, i images, s separators, t truncate outputs, a all. Selected messages show live impact prediction: token savings, new context percentage, and turns gained. d to delete with confirmation, u to undo from backup.
TUI keybindings
Navigation (all panels)
Key
Action
↑ / k
Move up
↓ / j
Move down
G / End
Jump to last entry
gg / Home
Jump to first entry (double-tap g)
Ctrl+D
Half page down
Ctrl+U
Half page up
Space / Ctrl+F
Full page down (sessions/overview)
Ctrl+B
Full page up
H
Jump to top of visible screen
M
Jump to middle of visible screen
L
Jump to bottom of visible screen
/
Activate search
n / N
Next / previous search match
?
Toggle help overlay
q / Esc
Back / quit
Sessions view
Key
Action
Enter
Open session detail
s
Cycle sort column
v
Vector control panel
Detail view
Key
Action
Tab / Shift+Tab
Next / previous panel
1
Overview panel
2
Messages panel
3
Cleanup panel
4
Ghost panel
Enter
Go to Messages
Messages panel
Key
Action
Space
Toggle selection on current entry
x
Select all progress messages
h
Select all snapshots
r
Select all stale reads
c
Select all sidechains
g
Select all tangents
i
Replace all images
s
Strip all separators
t
Truncate large outputs
a
Select all noise (all tiers)
d
Delete selected (with confirmation)
u
Undo last deletion from backup
K
Toggle keep marker
N
Toggle noise marker
p
Create commit point
!
Amputate range
e
Show epoch timeline
1-3
Set reasoning phase (exploratory/decision/operational)
0
Clear phase
Vector Control panel
Key
Action
C
Clean session
S
Split tangent range
E
Export decisions
CLI commands
Session discovery
Command
Description
contextspectre sessions
List all sessions (default: 20 most recent)
contextspectre list
Alias for sessions
contextspectre sessions --all
Show all sessions (no limit)
contextspectre sessions --limit 50
Show N most recent sessions
contextspectre sessions --active
Show sessions modified in last 5 minutes
contextspectre sessions --project <name>
Filter by project name or alias
contextspectre sessions --cwd
Show sessions for current directory (suggests relocation if none found)
When expert-mode is enabled (contextspectre config set expert-mode true), ContextSpectre automatically runs safe cleanup operations (Tier 1-3) when context pressure is detected. Triggers on user actions only (stats, watch poll, status-line), never in the background. Everything Tier 4+ remains manual.
Session targeting
Most commands accept a session ID, full path, or partial match. Additionally:
--cwd - auto-detect the most recent session for the current working directory
--auto - find and use the most recent session across all projects
--project <name> - filter by project name, path substring, or alias