Skip to content

feat: activate local-only team memory in open build - #648

Merged
kevincodex1 merged 2 commits into
Twigpine:mainfrom
Flo5k5:feat/activate-local-team-memory
Apr 13, 2026
Merged

kevincodex1 merged 2 commits into
Twigpine:mainfrom
Flo5k5:feat/activate-local-team-memory

Conversation

@Flo5k5

@Flo5k5 Flo5k5 commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Enable team memory in local-only mode for all open-build users. Two lines changed.

Key insight: team memory is already local

The team memory implementation is already almost entirely local — extraction, UI, prompts, file detection, path validation, and secret scanning all operate on local files. The cloud sync (OAuth + HTTP to /api/claude_code/team_memory) is a cleanly separated overlay. The watcher does an early return at watcher.ts:256 when OAuth is unavailable, so without OAuth the feature degrades gracefully to local-only storage.

Changes

  1. scripts/build.ts — TEAMMEM: false to true (includes team memory code in bundle)
  2. src/memdir/teamMemPaths.ts:77 — isTeamMemoryEnabled() returns true when auto-memory is enabled (previously gated by GrowthBook tengu_herring_clock which returned false in stub)

What works locally (zero additional changes needed)

  • Memory extraction with combined auto + team prompts
  • Team MEMORY.md loaded into conversation context
  • File selector with "Open team memory folder" option
  • Collapse tracking (read/search/write counts)
  • Secret scanning before persistence (blocks writes containing API keys)
  • Path validation + symlink escape protection
  • Team memory scoped per-project at ~/.claude/projects/<project>/memory/team/

What requires OAuth (not available in open build)

  • Cloud sync between team members (push/pull via API)
  • File watcher auto-push (watcher skips gracefully)

Relationship to other PRs

Test plan

  • bun run build — compiles successfully
  • bun run smoke — smoke tests pass
  • Verify ~/.claude/projects/<project>/memory/team/ directory is created
  • Verify team MEMORY.md is loaded into conversation context
  • Ask Claude to save a team memory, verify it writes to the team directory
  • Verify the sync watcher does not crash (graceful early return)
  • Verify secret scanning blocks writes containing API keys

Enable the TEAMMEM feature flag and the isTeamMemoryEnabled() gate so
team memory works in local-only mode for all open-build users.

Team memory is a shared memory system scoped per-project, stored at
~/.claude/projects/<project>/memory/team/. The implementation is
already almost entirely local — extraction, UI, prompts, file
detection, and path validation all work on local files.

The cloud sync overlay (OAuth + API) is cleanly separated: the
watcher does an early return when OAuth is unavailable, so the
feature degrades gracefully to local-only storage with no crashes.

What works locally:
- Memory extraction (auto + team, combined prompts)
- Team MEMORY.md loaded into conversation context
- File selector with team memory folder option
- Collapse tracking (read/search/write counts)
- Secret scanning before persistence
- Path validation + symlink protection

What requires OAuth (not available in open build):
- Cloud sync between team members
- Automatic push/pull via file watcher
Copilot AI review requested due to automatic review settings April 12, 2026 22:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables team memory functionality in the open build by turning on the TEAMMEM build feature flag and removing the GrowthBook/feature-flag gate so team memory becomes active whenever auto-memory is enabled.

Changes:

  • Enable TEAMMEM in the open-build bundler feature flags.
  • Make isTeamMemoryEnabled() return true whenever auto-memory is enabled (removing the tengu_herring_clock flag check).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
scripts/build.ts Turns on the TEAMMEM build-time feature flag so team memory code is included in the open-build bundle.
src/memdir/teamMemPaths.ts Removes the GrowthBook gate and unconditionally enables team memory when auto-memory is enabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/memdir/teamMemPaths.ts
Change isTeamMemoryEnabled() to read tengu_herring_clock with default
true instead of unconditional return true. This enables team memory by
default while preserving user opt-out via ~/.claude/feature-flags.json.
@kevincodex1
kevincodex1 merged commit 24d485f into Twigpine:main Apr 13, 2026
1 check passed
C1ph3r404 pushed a commit to C1ph3r404/openclaude that referenced this pull request Apr 29, 2026
* feat: activate local-only team memory in open build

Enable the TEAMMEM feature flag and the isTeamMemoryEnabled() gate so
team memory works in local-only mode for all open-build users.

Team memory is a shared memory system scoped per-project, stored at
~/.claude/projects/<project>/memory/team/. The implementation is
already almost entirely local — extraction, UI, prompts, file
detection, and path validation all work on local files.

The cloud sync overlay (OAuth + API) is cleanly separated: the
watcher does an early return when OAuth is unavailable, so the
feature degrades gracefully to local-only storage with no crashes.

What works locally:
- Memory extraction (auto + team, combined prompts)
- Team MEMORY.md loaded into conversation context
- File selector with team memory folder option
- Collapse tracking (read/search/write counts)
- Secret scanning before persistence
- Path validation + symlink protection

What requires OAuth (not available in open build):
- Cloud sync between team members
- Automatic push/pull via file watcher

* fix: preserve opt-out gate for team memory via feature flag

Change isTeamMemoryEnabled() to read tengu_herring_clock with default
true instead of unconditional return true. This enables team memory by
default while preserving user opt-out via ~/.claude/feature-flags.json.
The-FOOL-00 pushed a commit to The-FOOL-00/openclaude that referenced this pull request May 24, 2026
* feat: activate local-only team memory in open build

Enable the TEAMMEM feature flag and the isTeamMemoryEnabled() gate so
team memory works in local-only mode for all open-build users.

Team memory is a shared memory system scoped per-project, stored at
~/.claude/projects/<project>/memory/team/. The implementation is
already almost entirely local — extraction, UI, prompts, file
detection, and path validation all work on local files.

The cloud sync overlay (OAuth + API) is cleanly separated: the
watcher does an early return when OAuth is unavailable, so the
feature degrades gracefully to local-only storage with no crashes.

What works locally:
- Memory extraction (auto + team, combined prompts)
- Team MEMORY.md loaded into conversation context
- File selector with team memory folder option
- Collapse tracking (read/search/write counts)
- Secret scanning before persistence
- Path validation + symlink protection

What requires OAuth (not available in open build):
- Cloud sync between team members
- Automatic push/pull via file watcher

* fix: preserve opt-out gate for team memory via feature flag

Change isTeamMemoryEnabled() to read tengu_herring_clock with default
true instead of unconditional return true. This enables team memory by
default while preserving user opt-out via ~/.claude/feature-flags.json.
discopops pushed a commit to discopops/openclaude that referenced this pull request May 28, 2026
* feat: activate local-only team memory in open build

Enable the TEAMMEM feature flag and the isTeamMemoryEnabled() gate so
team memory works in local-only mode for all open-build users.

Team memory is a shared memory system scoped per-project, stored at
~/.claude/projects/<project>/memory/team/. The implementation is
already almost entirely local — extraction, UI, prompts, file
detection, and path validation all work on local files.

The cloud sync overlay (OAuth + API) is cleanly separated: the
watcher does an early return when OAuth is unavailable, so the
feature degrades gracefully to local-only storage with no crashes.

What works locally:
- Memory extraction (auto + team, combined prompts)
- Team MEMORY.md loaded into conversation context
- File selector with team memory folder option
- Collapse tracking (read/search/write counts)
- Secret scanning before persistence
- Path validation + symlink protection

What requires OAuth (not available in open build):
- Cloud sync between team members
- Automatic push/pull via file watcher

* fix: preserve opt-out gate for team memory via feature flag

Change isTeamMemoryEnabled() to read tengu_herring_clock with default
true instead of unconditional return true. This enables team memory by
default while preserving user opt-out via ~/.claude/feature-flags.json.
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.

4 participants