Expand description
History module — discovers and indexes past CLI agent conversations from disk.
Modules§
- adapter
- History adapter trait and shared types.
- agent_
sessions - One agent’s sessions from its record, for the History pane
(
history.agent_sessions). - claude_
adapter - Claude Code history adapter. Scans for session JSONL files across both the user’s global Claude homes and the AgentMux-isolated homes that current agents actually write to:
- index
- In-memory session index built from adapter discovery.
- record
- What AgentMux’s own record says about an agent’s conversations.
- typed
- What the user typed to an agent in its past conversations, for the first
fill of its input history (
docs/specs/SPEC_AGENT_INPUT_HISTORY_2026_10_18.md§4.7). Only the agent’s own sessions (its record, assearch_for_agentreads first), never ones found by folder or account alone, which may be another agent’s. Only what a person typed, by the origin srv signed on the record: every other origin, and a record with none, is left out, as are the[AgentMux]notes srv attached after what the person typed (reactive::held_notes).
Structs§
- History
Owner - Whose history a lookup is about: the definition id its identity links are keyed by, and the working directory its transcripts record.
- History
Service - The history service exposed to the RPC layer.
Enums§
- History
Search Error - Why a history search could not answer.
Constants§
- HISTORY_
INDEX_ BUILDING - A search’s answer while the first index build after srv start is running.
- WARM_
DELAY - How long after srv start the first index build waits
(
HistoryService::warm_in_background): past the window in which the user opens their first agents. The spec protects the first 30 s (SPEC_AGENT_OPEN_LATENCY_2026_09_27.md §5), and a cold build can take 25 s on its own, so a start inside that window would still overlap it (Codex P2 on #3930). A search before then starts the build early (HistoryService::refresh_for_search).
Functions§
- unix_
time_ to_ ms - SearchHistory’s
since/untilin milliseconds. They’re documented as Unix seconds, but a hit’s owntimestampis in milliseconds and is the natural value to pass back; a value this large is already milliseconds (as seconds it would be the year 5138).