In-flight /btw side conversation silently lost on Code -> Cowork -> Code switch (data loss)

Resolved 💬 2 comments Opened May 31, 2026 by mk768780 Closed Jul 3, 2026

..# Bug report — In-flight /btw side conversation lost when switching Code → Cowork → Code

Severity: High — silent loss of user conversation data, no warning, no recovery path.
Product: Claude desktop app 1.9659.2 (bundled claude-code 2.1.156) on macOS 26.5 (25F71).
Date observed: 31 May 2026.

Summary

While working in a Claude Code window, the user opened an in-flight /btw side conversation ("aside") and had a substantial exchange in it. They then switched the window to Cowork momentarily and switched back to Code. On return, the /btw side conversation was gone from the UI, and its contents are not recoverable from any on-disk store. No prompt, warning, or "you have an unsaved aside" affordance was shown before the switch discarded it.

No one performing a quick Code → Cowork → Code round-trip would expect to lose an active conversation.

Steps to reproduce

  1. Open a project in Code mode in the desktop app.
  2. Start a /btw side conversation and exchange several messages in it (do not close it).
  3. Switch the same window to Cowork mode.
  4. Switch back to Code mode.
  5. Result: the /btw aside and its messages are no longer present.

Expected behaviour

A short mode switch should preserve any in-flight side conversation, or at minimum:

  • persist the aside so it can be reopened, and/or
  • warn the user before discarding unsaved/in-flight content.

Actual behaviour

The aside is discarded silently and is unrecoverable.

Evidence (what persisted vs what did not)

Investigated every store the app uses on this machine:

  • Code session transcripts (~/.claude/projects/<project>/<id>.jsonl): only the main Code conversation was written. No aside thread present (grep for sidechat/btw markers and type fields shows only the normal main-conversation record types).
  • Cowork / local-agent-mode sessions (~/Library/Application Support/Claude/local-agent-mode-sessions/...): only an earlier, separate Cowork session exists; it is not the aside.
  • Renderer store — claude.ai IndexedDB (.../IndexedDB/https_claude.ai_0.indexeddb.leveldb/000070.log): contains the user's composer draft text autosaved keystroke-by-keystroke (the message box content as it was typed), but zero conversation/assistant recordsgrep for "sender", "assistant", "human", chat_messages, completion, conversation returns 0 hits.

Interpretation: the aside's conversation lived only in in-memory renderer state and was never flushed to disk, so the mode switch dropped it with no possibility of recovery. The only durable trace is the autosaved input draft, not the exchange.

Impact

  • Direct loss of user work (an in-flight conversation and any analysis/suggestions in it).
  • High surprise factor: a fast, common UI action (mode switch) destroys data.
  • Erodes trust — users reasonably assume a mode toggle is non-destructive.

Suggested fixes / mitigations

  1. Persist /btw asides to disk the same way main Code/Cowork conversations are persisted, keyed to the parent session, so they survive mode switches and app restarts.
  2. Preserve aside state across Code↔Cowork toggles within a window (don't tear down the Code thread tree on mode switch).
  3. If teardown is unavoidable, warn before discarding an in-flight aside, and/or offer to save it.
  4. Provide a recovery path (recently-closed / restore aside) for at least the current session.

Notes

  • Project-specific content has been omitted from this report; it concerns sensitive material. The bug is independent of conversation content.
  • Reporter can attach the IndexedDB observation above on request (no sensitive content needed to demonstrate the persistence gap).

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗