← Commit history

Finalize Claude Conversation Management doc: merged-shape (active/loaded/rc_active), RC toggle-detection

John Lauer ·e4a55ee37c ·4mo ago ·parent f81d9da
1 file changed +25−10
claude-conversation-management.md+25−10
@@ -41,17 +41,26 @@ curl -s $HD/claude/conversations {   "count": 2,   "conversations": [-    { "ordinal": 0, "context_id": 16, "title": "Find the capital of France",-      "compose_text": "", "msg_count": 8,-      "session_id": "b352055b-471f-46dc-b412-a4450642e831" },-    { "ordinal": 1, "context_id": 19, "title": "Untitled",-      "compose_text": "a draft I haven't sent", "msg_count": 5, "session_id": null }+    { "ordinal": 3, "active": true, "loaded": true, "context_id": 7,+      "title": "Calculate 10 times 10", "tab_label": "Calculate 10 times 10",+      "compose_text": "", "msg_count": 16,+      "session_id": "566cec21-d84f-4600-a119-e31f88683ff3",+      "rc_active": false, "remote_control_url": null },+    { "ordinal": 1, "active": false, "loaded": false, "context_id": null,+      "title": "Find the capital of France", "tab_label": "Find the capital of Fran…",+      "compose_text": null, "msg_count": null,+      "session_id": "b352055b-471f-46dc-b412-a4450642e831",+      "rc_active": null, "remote_control_url": null }   ] } ```+- The list **merges three sources** so you see everything: the tab bar (every conversation ++  which is `active`), the live webviews (rich data for `loaded` tabs), and the on-disk logs (GUIDs).+- `loaded:false` means VS Code disposed that background tab's webview — its `context_id`,+  `compose_text`, `msg_count`, and `rc_active` read `null` until you activate it. Its `session_id`+  still resolves when the title matches the log. - `title` is the name Claude gives the conversation after its first message (before that it's-  `Untitled`).-- `session_id` is the conversation's on-disk GUID (null until it has messages).+  `Untitled`); `rc_active` shows whether Remote Control is on.  ## Open, close, switch @@ -83,13 +92,14 @@ curl -s -X POST $HD/claude/inject \ ## ⭐ Remote Control: continue on claude.ai / your phone  ```bash-curl -s -X POST $HD/claude/remote-control -d '{"context_index":16}'+curl -s -X POST $HD/claude/remote-control -d '{"context_index":7}' ``` ```jsonc {   "ok": true,-  "context_id": 16,-  "remote_control_url": "https://claude.ai/code/session_012v2M3kAjeBEwsT8QeXzpd7"+  "rc_active": true,+  "context_id": 7,+  "remote_control_url": "https://claude.ai/code/session_014koKPJxmjYpnX2SjRRqrD3" } ``` Open that `remote_control_url` on **claude.ai** (in your browser or the **Claude mobile@@ -97,6 +107,11 @@ app**) and you can see and drive that exact conversation from anywhere. This is from "a conversation locked inside my desktop app" to "my conversation, in the cloud, on any device." +Remote Control is a **toggle**, so this endpoint detects the current state first: re-calling it+on an already-on conversation just returns the existing URL (it won't switch it off), and+`{enable:false}` turns it off. Each conversation's state shows up as `rc_active` in+`/claude/conversations`.+ ## How HD knows which on-disk log is which conversation  Claude stores each conversation as `~/.claude/projects/<project>/<uuid>.jsonl` (with its