Skip to main content

Module claude_adapter

Module claude_adapter 

Source
Expand description

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:

  • ~/.claude/projects/ and ~/.config/claude-*/projects/ (global / legacy)
  • <AGENTMUX_SHARED_DIR>/providers/claude/projects/ (default isolated home)
  • <AGENTMUX_SHARED_DIR>/identities/<account_id>/claude/projects/ (per account, global)
  • /channels//identities//claude/projects/ and /dev//(/)?identities/*/claude/projects/ (per-channel isolated — Step 4 of docs/specs/SPEC_AGENT_IDENTITY_HISTORY_PERSISTENCE_PROTOCOL_2026_08_16.md. Step 3 links these forward to the global location, but history written before that fix landed, or for an account whose link creation failed (best-effort, can fail), still has real data only under these per-channel paths — scanned here so it stays discoverable rather than requiring a manual filesystem search.)

Structs§

ClaudeHistoryAdapter
Where Claude homes live. The homes under them — one per account, and channels — are listed again on every discovery (ClaudeHistoryAdapter::base_dirs), because they are created while srv runs: an account added or switched after srv started used to stay invisible until the next restart.