Skip to content

feat(claude-code): mine Windows Cowork sessions - #639

Open
xnne-bot wants to merge 3 commits into
NevaMind-AI:mainfrom
XnneHangLab-Mirror:feat/cowork-windows-reader
Open

feat(claude-code): mine Windows Cowork sessions#639
xnne-bot wants to merge 3 commits into
NevaMind-AI:mainfrom
XnneHangLab-Mirror:feat/cowork-windows-reader

Conversation

@xnne-bot

@xnne-bot xnne-bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

📝 Pull Request Summary

Adds Windows-first Claude Cowork transcript mining through the existing memu-claude-code bridge.


✅ What does this PR do?

  • Adds a read-only CoworkTranscriptSource that discovers known Claude Desktop data roots and reads one local_<id>/audit.jsonl as one user-visible Cowork session.
  • Composes Cowork with Claude Code under the existing bridge, preserving one scheduler, one working tree, and one shared memory backend.
  • Drops audit transport data, lifecycle noise, and replayed user copies; adds sanitized protocol fixtures and regression coverage.
  • Adds scan regions so a settled source root cannot hide unprocessed history in another root.

🤔 Why is this change needed?

Closes #637. Claude Code Desktop transcripts are already covered by ~/.claude/projects, while Cowork persists distinct, locally readable audits. Keeping Cowork as its own reader avoids duplicate Code ingestion while making Cowork-derived memories available to the existing shared store.

Add a dedicated Cowork audit reader to the existing Claude Code bridge so one scheduled task can mine both surfaces without duplicating Claude Code Desktop history.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@MrXnneHang
MrXnneHang force-pushed the feat/cowork-windows-reader branch from b589f21 to 316309f Compare August 14, 2026 08:01
Comment thread README.md Outdated
MrXnneHang and others added 2 commits August 14, 2026 17:08
Keep README support semantics focused on install completeness while the Claude Code bridge gains read-only Cowork ingestion.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Apply the repository formatter to the Cowork transcript source.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@xnne-bot

Copy link
Copy Markdown
Contributor Author

The Code/Cowork relationship is simpler when shown as two sibling readers:

                   memu-claude-code
                          |
                          v
             ClaudeDesktopTranscriptSource
                  (combines two readers)
                    /             \
                   v               v
        Claude Code reader      Cowork reader
        ~/.claude/projects      Desktop audit.jsonl
                   \               /
                    v             v
                 one session queue
               (sorted by file mtime)
                          |
                          v
          same cursor -> prepare -> commit
                          |
                          v
                same memory backend

They do not parse each other's files. They only meet at the composite source, then share the existing bridge pipeline, schedule, and memory store.

For Cowork paths, the policy is:

platform == Windows
└── scan every existing known root
    ├── %APPDATA%\Claude
    ├── %LOCALAPPDATA%\Claude-3p
    └── MSIX Claude_* roots

macOS / Linux
└── disabled until their real layouts are verified

So Windows does not choose one path: it scans all existing candidates. Each Code/Cowork root has its own scan region, so reaching an unchanged session in one root does not stop the others.

One useful test to add: prove that an unchanged Cowork root A cannot hide pending sessions in Cowork root B.

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.

[FEATURE] 支持读取本地 Claude Cowork session

2 participants