Problem
HTTP remote sync recursively mirrors every regular file beneath most configured provider roots. For Cursor, VS Code Copilot and Zed, those roots contain much more than session data.
On one machine, ~/.agentsview/remote-mirrors reached 11 GB:
7.4G Library/Application Support/Code/User
5.5G Code/User/workspaceStorage
1.4G Code/User/globalStorage
3.0G Library/Application Support/Zed
1.6G Zed/external_agents/registry
The mirror included unrelated extension data, external-agent packages, language servers, node_modules, Cursor canvases, MCP metadata and files named mcp_auth.json.
These files consume disk, increase initial transfer and manifest-walk costs, and may copy application state including secrets that the session parsers never read.
Current behaviour
For ordinary providers, ResolveTargets adds the configured root to TargetSet.Dirs. BuildManifest and WriteArchive then recursively walk that directory.
Relevant code:
The original incremental HTTP remote sync design chose a complete mirror so parsers could read sibling files without adding provider file layouts to the transport protocol.
The collector still needs every raw file a parser may read. It does not need unrelated files beneath a broad application-data root.
Existing precedent
TargetSet.Files already supports curated provider exports.
RooCode exports only discovered task metadata and message files. Its resolver explicitly excludes mcp_settings.json, which may contain MCP environment variables, API keys and authentication headers, along with caches and checkpoints.
Kilo Legacy similarly exports only:
task_metadata.json
ui_messages.json
api_conversation_history.json
Windsurf creates a sanitized export of selected state-database content. Poolside narrows its application-data root to trajectories/.
Relevant code:
Proposed change
Resolve Cursor, VS Code Copilot and Zed to the smallest complete set of raw parser inputs, including required companion files.
Cursor
Use a verbatim file-scoped target containing the transcript layouts already recognised by the parser:
<project>/agent-transcripts/<session>.jsonl
<project>/agent-transcripts/<session>.txt
<project>/agent-transcripts/<session>/<session>.jsonl
<project>/agent-transcripts/<session>/<session>.txt
See cursor_provider.go.
This should exclude canvases, node_modules, MCP state and unrelated project metadata.
VS Code Copilot
Export only:
workspaceStorage/<hash>/chatSessions/*.{json,jsonl}
workspaceStorage/<hash>/workspace.json
globalStorage/emptyWindowChatSessions/*.{json,jsonl}
globalStorage/transferredChatSessions/*.{json,jsonl}
workspace.json must remain included because it supplies project attribution.
See vscode_copilot_provider.go.
This should exclude unrelated extension storage, tooling databases, user history and caches.
Zed
Zed parses the shared database:
Its watcher also recognises:
threads/threads.db-wal
threads/threads.db-shm
See zed_provider.go.
At minimum, narrow the target to the threads/ directory. Prefer a consistent SQLite snapshot, similar to Hermes, to avoid copying the database and WAL while Zed is writing them.
This should exclude Zed’s external-agent registry, language servers, Node installations and other application state.
Design compatibility
This change is compatible with the incremental HTTP remote-sync design. It preserves:
- collector-owned parsing
- raw-source transfer
- persistent per-host mirrors
- manifest-based delta transfer
- local reparsing
- recovery after mirror loss
- existing session identity and database semantics
Provider-specific knowledge remains in target resolution, not in the transport protocol. The protocol continues to exchange the existing TargetSet, manifest and archive structures. Windsurf, RooCode, Kilo Legacy and Poolside already establish this boundary.
“Complete mirror” should mean a complete copy of each provider’s resolved parse inputs, including required companions. It should not require recursively copying an application-data root containing unrelated files.
The change is also compatible with:
Acceptance criteria
- Cursor sync transfers only parser-discovered transcripts and required companions.
- VS Code Copilot sync transfers only chat sessions and required workspace metadata.
- Zed sync transfers only data required to parse
threads.db.
- A fresh curated sync produces the same parsed sessions as the existing full-root sync.
- Incremental sync transfers only changed selected files.
- Additions, updates, deletions and interrupted sync recovery continue to work.
- Existing symlink, path-confinement and forbidden-root protections remain in place.
- Missing files caused by target-resolution races do not fail the whole sync.
- Existing mirrors remove files absent from the new curated manifest.
- Tests prove unrelated files beneath each configured root do not appear in manifests or archives.
- Remote-access documentation describes curated provider exports and their disk requirements.
Non-goals
- Sending parsed sessions between AgentsView instances.
- Changing the collector-owned parsing model.
- Changing session identity or database schemas.
- Narrowing every provider in the same change.
Problem
HTTP remote sync recursively mirrors every regular file beneath most configured provider roots. For Cursor, VS Code Copilot and Zed, those roots contain much more than session data.
On one machine,
~/.agentsview/remote-mirrorsreached 11 GB:The mirror included unrelated extension data, external-agent packages, language servers,
node_modules, Cursor canvases, MCP metadata and files namedmcp_auth.json.These files consume disk, increase initial transfer and manifest-walk costs, and may copy application state including secrets that the session parsers never read.
Current behaviour
For ordinary providers,
ResolveTargetsadds the configured root toTargetSet.Dirs.BuildManifestandWriteArchivethen recursively walk that directory.Relevant code:
internal/remotesync/resolve.gointernal/remotesync/manifest.gointernal/remotesync/archive.goThe original incremental HTTP remote sync design chose a complete mirror so parsers could read sibling files without adding provider file layouts to the transport protocol.
The collector still needs every raw file a parser may read. It does not need unrelated files beneath a broad application-data root.
Existing precedent
TargetSet.Filesalready supports curated provider exports.RooCode exports only discovered task metadata and message files. Its resolver explicitly excludes
mcp_settings.json, which may contain MCP environment variables, API keys and authentication headers, along with caches and checkpoints.Kilo Legacy similarly exports only:
Windsurf creates a sanitized export of selected state-database content. Poolside narrows its application-data root to
trajectories/.Relevant code:
resolveRooCodeTargetresolveKiloLegacyTargetresolvePoolsideTargetProposed change
Resolve Cursor, VS Code Copilot and Zed to the smallest complete set of raw parser inputs, including required companion files.
Cursor
Use a verbatim file-scoped target containing the transcript layouts already recognised by the parser:
See
cursor_provider.go.This should exclude canvases,
node_modules, MCP state and unrelated project metadata.VS Code Copilot
Export only:
workspace.jsonmust remain included because it supplies project attribution.See
vscode_copilot_provider.go.This should exclude unrelated extension storage, tooling databases, user history and caches.
Zed
Zed parses the shared database:
Its watcher also recognises:
See
zed_provider.go.At minimum, narrow the target to the
threads/directory. Prefer a consistent SQLite snapshot, similar to Hermes, to avoid copying the database and WAL while Zed is writing them.This should exclude Zed’s external-agent registry, language servers, Node installations and other application state.
Design compatibility
This change is compatible with the incremental HTTP remote-sync design. It preserves:
Provider-specific knowledge remains in target resolution, not in the transport protocol. The protocol continues to exchange the existing
TargetSet, manifest and archive structures. Windsurf, RooCode, Kilo Legacy and Poolside already establish this boundary.“Complete mirror” should mean a complete copy of each provider’s resolved parse inputs, including required companions. It should not require recursively copying an application-data root containing unrelated files.
The change is also compatible with:
docs/remote-access.md, including target allowlisting, mirror recovery and independent transfer and import breadthdocs/internal/background-sync-efficiency.md, by reducing unrelated mirror cardinalityScoped Push and Session Provider Controls Design, because providers remain eligible for remote export and importSECURITY.md, because the collector continues parsing raw remote inputs as untrusted data while transferring less unrelated stateAcceptance criteria
threads.db.Non-goals