diff --git a/docs/chat-view-plan.md b/docs/chat-view-plan.md index 315d9798..50eb103b 100644 --- a/docs/chat-view-plan.md +++ b/docs/chat-view-plan.md @@ -135,11 +135,14 @@ The chat view also listens for these events: `transcript:complete` does not help here. It fires only for a `result` row, and an interactive Claude transcript has none. -A Docker case whose hooks do reach the server gets no mid-turn updates. Its hook reports the -transcript's path inside the container, which the host cannot open. The watcher -keeps that path, so the full read starts no second one. Such a session refetches on -`session:working` and `session:idle` alone, and so updates only at the start and end -of each turn. +A Docker case reports the transcript's path inside the container +(`/home/agent/.claude/projects/...`), which does not exist on the host. The case mounts the +host's `~/.claude/projects` at that folder, so `hostTranscriptPath()` +(`claude-conversation-report.ts`) maps the reported path to the host's copy before the +watcher starts, and such a session gets the same mid-turn `transcript:update` events as a +local one. A reported path outside that folder, or one with a `..` segment, is kept as +reported. The host cannot open it, so that session refetches on `session:working` and +`session:idle` alone and updates only at the start and end of each turn. ## How the user sends a prompt diff --git a/src/web/server.ts b/src/web/server.ts index 6fb22d07..8fe3e121 100644 --- a/src/web/server.ts +++ b/src/web/server.ts @@ -1550,8 +1550,9 @@ export class WebServer extends EventEmitter { /** * Read My Mind intent capture: fold one transcript user prompt into the * case's intent profile (docs/readmymind-plan.md). Opt-in via - * `readMyMindEnabled` (default OFF) and claude-only; the mode gate is - * belt-and-braces since only hook-fed sessions have a transcript watcher. + * `readMyMindEnabled` (default OFF) and claude-only. The mode gate is needed: + * a transcript watcher is started by hook reports, statusline reports and a + * full transcript read (the chat view), not only for hook-fed Claude sessions. */ private async captureIntentPrompt(sessionId: string, text: string): Promise { const session = this.sessions.get(sessionId);