Summary
Add Claude Desktop "Code" mode sessions to CodeV's session list, similar to VS Code session support (PR #103).
Feasibility Research
Claude Desktop's Code mode shares the same ~/.claude/ data layer. Integration feasibility:
| Capability |
Status |
How |
| Detect sessions |
✅ |
~/.claude/sessions/*.json with entrypoint: "claude-desktop" |
| Session metadata |
✅ |
Same JSONL format as CLI/VS Code |
| Status dots |
✅ |
Hooks fire normally, codev-status files work |
| Bring to foreground |
✅ |
open -a "Claude" |
| Switch to specific session |
❌ |
claude:// URI exists but accepted parameters unknown |
| history.jsonl |
❌ |
Not present (same gap as VS Code) |
| IDE lock file |
❌ |
Not created by Claude Desktop |
Why it doesn't appear now
detectActiveSessions() only handles claude-vscode specially (reads JSONL directly). claude-desktop falls into the CLI path which requires history.jsonl matching — but Claude Desktop sessions aren't in history.jsonl.
Fix
Treat claude-desktop the same as claude-vscode in:
detectActiveSessions() — read JSONL directly instead of matching against history.jsonl
scanClosedVSCodeSessions() — rename/extend to also scan for claude-desktop entrypoint
- Display:
[DESKTOP] badge
- Switch:
open -a "Claude" (app-level only, no session-level switching yet)
Comparison with VS Code support
|
VS Code |
Claude Desktop |
| entrypoint |
claude-vscode |
claude-desktop |
| JSONL format |
Same |
Same |
| history.jsonl |
❌ |
❌ |
| IDE lock file |
✅ |
❌ |
| URI handler (session-level) |
✅ vscode://...?session=UUID |
❓ claude:// exists, params unknown |
| Hooks/status |
✅ |
✅ |
| Switch precision |
Session-level (URI handler) |
App-level only (open -a "Claude") |
Session data observed
~/.claude/sessions/38228.json:
{
"pid": 38228,
"sessionId": "033bedee-f8d7-4331-a040-39ce09ed7e78",
"cwd": "/Users/grimmer/git/claude-desktop-claude-code-test",
"startedAt": 1775483211434,
"kind": "interactive",
"entrypoint": "claude-desktop"
}
Process spawned as child of Claude.app with --output-format stream-json --permission-mode acceptEdits and LSP plugins (rust, typescript, swift, frontend-design).
Open questions
- Does
claude:// URI support session parameters? (e.g., claude://code?session=UUID)
- Does Claude Desktop's
~/Library/Application Support/Claude/local-agent-mode-sessions/ contain useful session metadata?
- Will Claude Desktop eventually write to
history.jsonl?
Related
🤖 On behalf of @grimmerk — generated with Claude Code
Summary
Add Claude Desktop "Code" mode sessions to CodeV's session list, similar to VS Code session support (PR #103).
Feasibility Research
Claude Desktop's Code mode shares the same
~/.claude/data layer. Integration feasibility:~/.claude/sessions/*.jsonwithentrypoint: "claude-desktop"open -a "Claude"claude://URI exists but accepted parameters unknownWhy it doesn't appear now
detectActiveSessions()only handlesclaude-vscodespecially (reads JSONL directly).claude-desktopfalls into the CLI path which requireshistory.jsonlmatching — but Claude Desktop sessions aren't inhistory.jsonl.Fix
Treat
claude-desktopthe same asclaude-vscodein:detectActiveSessions()— read JSONL directly instead of matching against history.jsonlscanClosedVSCodeSessions()— rename/extend to also scan forclaude-desktopentrypoint[DESKTOP]badgeopen -a "Claude"(app-level only, no session-level switching yet)Comparison with VS Code support
claude-vscodeclaude-desktopvscode://...?session=UUIDclaude://exists, params unknownopen -a "Claude")Session data observed
~/.claude/sessions/38228.json:{ "pid": 38228, "sessionId": "033bedee-f8d7-4331-a040-39ce09ed7e78", "cwd": "/Users/grimmer/git/claude-desktop-claude-code-test", "startedAt": 1775483211434, "kind": "interactive", "entrypoint": "claude-desktop" }Process spawned as child of Claude.app with
--output-format stream-json --permission-mode acceptEditsand LSP plugins (rust, typescript, swift, frontend-design).Open questions
claude://URI support session parameters? (e.g.,claude://code?session=UUID)~/Library/Application Support/Claude/local-agent-mode-sessions/contain useful session metadata?history.jsonl?Related
🤖 On behalf of @grimmerk — generated with Claude Code