Attachments category syncs session tool-results/ and subagents/ alongside memory/

Open
#112 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
66/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
cli

Research direction

Start with the attachments walker in src/artifacts/registry.rs around line 224 and trace how it selects files under projects/. Compare its filtering with exclude_patterns and check the existing tests for attachment selection. Done means session tool-results/ and subagents/ byproducts can be excluded while the intended memory/ files still sync; the issue leaves the exact fix open.

Written by the indexing model from the issue text.

Description

The attachments category picks up every non-.jsonl file under projects/ (src/artifacts/registry.rs:224), and exclude_patterns does not apply to it. With transcripts excluded (exclude_patterns = ["*.jsonl"]) to sync only per-project memory/, the first push still carried session byproducts:

501  projects/*/memory/*.md            (wanted)
414  projects/*/<session>/tool-results/*.txt
338  projects/*/<session>/subagents/*.meta.json
 12  jpg/pdf inside session dirs

Attachment deletions don't propagate, so these stay in the repo after Claude Code's cleanupPeriodDays removes the sessions locally, and get materialized on every other machine.

Possible fixes, any of these:

  • skip <session-uuid>/tool-results/ and <session-uuid>/subagents/ in the attachments walker
  • honor exclude_patterns for attachments
  • a memory-only mode for attachments

Version: 0.4.1, macOS arm64.

Dominant language
Rust
Stars
104
Forks
21
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from perfectra1n/claude-code-sync

All issues in perfectra1n/claude-code-sync

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.