Per-repo shared knowledge synced across all org members via /api/claude_code/team_memory. Uses SHA-256 content hashing for delta-only uploads. Files with detected secrets are silently skipped. Server always wins on pull; local wins on push. ETag-based optimistic locking.
| Method | Endpoint | Purpose |
|---|---|---|
GET | /api/claude_code/team_memory?repo={owner/repo} | Pull all data (includes entry checksums) |
GET | ...?repo={owner/repo}&view=hashes | Metadata + checksums only (no bodies — cheap probe) |
PUT | /api/claude_code/team_memory?repo={owner/repo} | Upload entries (upsert semantics) |
CLAUDE_AI_INFERENCE_SCOPE + CLAUDE_AI_PROFILE_SCOPE. Unavailable on Bedrock, Vertex, Foundry. Repo identity from git remote: owner/repo.Only changed files are uploaded. SHA-256 content hashing determines what's different.
entryChecksums: Map<key, "sha256:<hex>">. Stored in state.serverChecksums.hashContent(content) = 'sha256:' + createHash('sha256').update(content, 'utf8').digest('hex')serverChecksums.get(key) !== localHash. Unchanged files skipped entirely.30+ high-confidence gitleaks rules run BEFORE upload. Files with detected secrets are silently skipped — never uploaded.
scanForSecrets(content) runs compiled regex rules. Deduped by rule ID. Returns { ruleId, label } matches.
Secret VALUE never logged — only label + rule ID + file path. Compliant with PSR M22174.
Files with matches: skipped entirely (not uploaded, no partial redaction).
Optimistic locking via ETags. On conflict (412), cheap probe + recompute delta + retry.
serverChecksums with teammate's changes.syncTeamMemory() runs pull first (full, skip ETag cache), writes remote entries to local, then pushes local with conflict resolution. Returns { success, filesPulled, filesPushed, error }.User settings (not project/local/policy) uploaded to /api/claude_code/user_settings. 500KB max. Incremental — only changed entries. Used by CCR to sync config before plugin installation.
| Aspect | Team Memory | Settings Sync |
|---|---|---|
| Scope | Per-repo (git remote) | Per-user (global) |
| Direction | Bidirectional (pull + push) | Upload only (CLI → cloud) |
| Max size | 250KB per entry | 500KB per file |
| Secret scanning | Yes (30+ rules) | No |
| Availability | First-party OAuth only | First-party OAuth only |