Skip to main content

Module history

Module history 

Source
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, as search_for_agent reads 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§

HistoryOwner
Whose history a lookup is about: the definition id its identity links are keyed by, and the working directory its transcripts record.
HistoryService
The history service exposed to the RPC layer.

Enums§

HistorySearchError
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/until in milliseconds. They’re documented as Unix seconds, but a hit’s own timestamp is 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).