Skip to content

fix(app): keep cell chat identities separate - #1965

Closed
santoshkumarradha wants to merge 2 commits into
app/v3from
lane/d6-chat-identity
Closed

santoshkumarradha wants to merge 2 commits into
app/v3from
lane/d6-chat-identity

Conversation

@santoshkumarradha

@santoshkumarradha santoshkumarradha commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Desktop chats using cell storage all received the ID .cell. Opening another chat overwrote the first chat's backend record and mixed transcript and ownership state.

 agent ID from transcript
- basename(immediate parent)
+ session folder from FolderOf, then Place.ID

The fix reuses the existing layout API and preserves legacy identities.

Evidence

  • Before: TestAppIndependentChatsKeepTheirOwnTranscripts failed with two new chats share identity ".cell" using the real in-process engine and cell minting.
  • After: both cell and legacy cases create independent chats, close/reopen billing, send separate follow-ups to both chats and read exactly each chat's own two user messages. Four focused backend tests pass.
  • Command: go test ./cmd/codeaf -run '^(TestAppIndependentChatsKeepTheirOwnTranscripts|TestAppHoldsARealConversationInProcess|TestAppLetsAnIdleConversationGoAndTheNextSendReopensIt|TestAppCreateWithTextStartsTheTurnAndNamesTheAgent)$' -count=1 -timeout=90s
  • Live binary replay on Spark: make build at exact baseline 1aa12a7ff reproduced two .cell IDs and the exact reported ownership conflict. make build at patched 87535613d passed two separate chats, billing close/reopen, four successful OpenRouter turns, and exactly each chat's own two messages. Fresh homes selected deepseek/deepseek-v4.1-flash for every role and tier. Both temporary worktrees were removed afterward.
  • Independent Standards and Spec reviews completed; a test callback teardown hazard was fixed before commit.

Merge Danger

Door: two-way

Blast Radius: desktop identity

No migration or deletion. Existing desktop tabs saved as .cell are not repaired. Patched macOS binary acceptance has not run. Vague and overlong title behavior is outside this fix.

Cell transcripts live at <id>/.cell/transcript.jsonl. appAgentID used the immediate parent, so every cell was .cell and later creates overwrote the held record. Use the existing layout-aware FolderOf and Place.ID. Legacy and flat fallback behavior stay intact.

Laziness Protocol keeps the fix in the existing helper. Test Behavior Not Implementation covers real mint/open/send, independent transcripts, close/reopen and separate follow-ups with legacy and cell layouts. Prove It Works: the cell test failed with duplicate .cell before the fix; four focused backend tests now pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_014ybUTo9ro1p9yNGyPHawz7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_014ybUTo9ro1p9yNGyPHawz7
@AbirAbbas

Copy link
Copy Markdown
Collaborator

Thanks for isolating the cell chat identity collision and writing up the two-chat reproduction. The identity fix shipped in #1973 and is on current app/v3, with permanent cell and legacy identity coverage. Your original independent-chat test also passes unchanged against today's desktop engine in both layouts, including close/reopen and separate follow-ups. Closing this as shipped; the existing-tab migration limitation is still as described here.

@AbirAbbas AbirAbbas closed this Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants