Cowork conversations were never recorded in Sessions/Usage because their
transcripts live outside ~/.claude/projects, under the Claude Desktop app
data dir at local-agent-mode-sessions/<org>/<workspace>/local_<uuid>/.claude/
projects/<enc>/<cliSessionId>.jsonl, which the Claude discovery never reaches.
Add a "cowork" agent (display name "Claude Cowork", IDPrefix "cowork:",
COWORK_DIR / cowork_dirs config) that discovers those transcripts and parses
them through the existing Claude JSONL parser, then rewrites the results into
the cowork namespace: prefixed session IDs, title from the local_<uuid>.json
metadata (falling back to the ai-title event), project from userSelectedFolders
(else "cowork"), and metadata-derived timestamps for empty transcripts. Token
usage is now counted because the transcripts are standard Claude Code JSONL with
message.usage.
Discovery walks only the org/workspace structure, skipping the heavy
local_<uuid>/ working dirs and the skills-plugin mirror. Subagent transcripts
under subagents/ are ingested too, matching Claude, so subagent drill-down works
and SubagentSessionID links resolve. The skip check folds the metadata file's
mtime into a composite mtime so title renames are re-parsed instead of skipped.
Symlinked project directories are followed only when contained within the
session dir, matching the Cursor discovery guard. Live file-watch events are
classified via ClassifyCoworkPath; full and periodic sync are Registry-driven.
Default dirs cover macOS, Linux, and Windows; Docker uses COWORK_DIR pointing at
the mounted host directory. The agent surfaces as "Claude Cowork" in the agent
directories settings, session filters, and exports.
Adds support for indexing Claude Desktop "cowork" (local agent mode) sessions, which were previously not discovered, so their conversations and statistics never showed up in Sessions/Usage.
Fixes #639.
Claude Desktop stores cowork sessions under its local-agent-mode-sessions directories — on macOS
~/Library/Application Support/Claude/local-agent-mode-sessions/<uuid>/<uuid>, with Linux and Windows equivalents. This adds a newcoworkagent to the registry with its own discovery, parser, and source-file resolution, so these sessions sync into SQLite and are counted like any other agent.What's included:
coworkagent definition in the parser registry (internal/parser/types.go) with thecowork:ID prefix and per-OS default directories (internal/parser/cowork_paths.go).internal/parser/cowork.go) plus tests.internal/sync/engine.go) so cowork directories are discovered and watched.Where to look:
internal/parser/cowork.gofor the parsing and discovery logic, and the registry entry ininternal/parser/types.go.Limitation: the on-disk cowork format is derived from observing Claude Desktop's local-agent-mode-sessions output, so it may need updates if that format changes.