Skip to content

Commit bfb5a09

Browse files
committed
Release v6.2.5 Claude memory de-duplication
1 parent a982c88 commit bfb5a09

10 files changed

Lines changed: 67 additions & 16 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## Unreleased
44

5+
## v6.2.5 (2026-05-19)
6+
7+
### Claude Managed Memory De-Duplication Hotfix
8+
9+
- **Claude Project Memory De-Duplicated**: managed `.claude/CLAUDE.md` bundles no longer copy the project-level `CLAUDE.md`, allowing Claude to load it natively from the working directory.
10+
- **Managed Memory Sources Preserved**: provider user memory from real `~/.claude/CLAUDE.md`, `.ccb/ccb_memory.md`, and per-agent `.ccb/agents/<agent>/memory.md` still project into the managed Claude home.
11+
- **Project Memory Loader Flag Added**: `load_memory_sources(..., include_provider_native_project=False)` can now skip provider-native project memory while the default behavior still includes it for existing callers.
12+
513
## v6.2.4 (2026-05-18)
614

715
### Codex Managed Config TOML Hotfix

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<img src="https://img.shields.io/badge/Every_Model_Controllable-CF1322?style=for-the-badge" alt="Every Model Controllable">
88
</p>
99

10-
[![Version](https://img.shields.io/badge/version-6.2.4-orange.svg)]()
10+
[![Version](https://img.shields.io/badge/version-6.2.5-orange.svg)]()
1111
[![Platform](https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20%7C%20Windows-lightgrey.svg)]()
1212

1313
**English** | [Chinese](README_zh.md)
@@ -74,10 +74,9 @@ Build project-local teams with roles, pane layout, provider state, worktree isol
7474
<details>
7575
<summary><b>Latest release highlights</b></summary>
7676

77-
- **Codex managed config handles rich TOML**: inherited `config.toml` with inline table arrays now renders cleanly instead of failing on parsed dict values.
78-
- **Fallback config copy avoids duplicate features sections**: managed Codex homes update existing `[features]` blocks and stop at `[[array_of_tables]]` boundaries when no TOML parser is available.
79-
- **Installers provision TOML parsing when needed**: Linux/macOS and Windows installers auto-install `tomli>=2.0.0` when no TOML reader exists, with `CCB_INSTALL_TOMLI=0` available to skip.
80-
- **Managed venv setup installs dependencies in the right scope**: release installs add `tomli` inside the managed venv before optional watchdog setup.
77+
- **Claude managed memory avoids duplicate project rules**: managed `.claude/CLAUDE.md` no longer copies project-level `CLAUDE.md`; Claude continues loading that file natively from the working directory.
78+
- **Managed Claude memory keeps the right inherited sources**: real `~/.claude/CLAUDE.md`, `.ccb/ccb_memory.md`, and per-agent `.ccb/agents/<agent>/memory.md` still project into the managed bundle.
79+
- **Memory source loading is now controllable**: `load_memory_sources(..., include_provider_native_project=False)` can skip provider-native project memory while existing callers keep the default include behavior.
8180

8281
See [Release Notes](#release-notes) for the full history.
8382

@@ -339,6 +338,15 @@ Thanks to the [Linux.do community](https://linux.do) for testing, feedback, and
339338
Historical note: older release notes below may mention `askd`, legacy flags, or removed commands. Those references are kept only as changelog history and do not redefine the current CLI surface.
340339

341340
<details open>
341+
<summary><b>v6.2.5</b> - Claude Managed Memory De-Duplication Hotfix</summary>
342+
343+
- Stops copying project-level `CLAUDE.md` into managed `.claude/CLAUDE.md`, so Claude reads it once from the working directory.
344+
- Keeps provider user memory, CCB shared project memory, and per-agent private memory in the managed Claude bundle.
345+
- Adds an opt-out flag for provider-native project memory in `load_memory_sources` while preserving default behavior for other callers.
346+
347+
</details>
348+
349+
<details>
342350
<summary><b>v6.2.4</b> - Codex Managed Config TOML Hotfix</summary>
343351

344352
- Renders dict values as inline TOML tables so inherited Codex configs with inline table arrays no longer crash during managed-home projection.

README_zh.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<img src="https://img.shields.io/badge/模型皆可控-CF1322?style=for-the-badge" alt="模型皆可控">
88
</p>
99

10-
[![Version](https://img.shields.io/badge/version-6.2.4-orange.svg)]()
10+
[![Version](https://img.shields.io/badge/version-6.2.5-orange.svg)]()
1111
[![Platform](https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20%7C%20Windows-lightgrey.svg)]()
1212

1313
[English](README.md) | **中文**
@@ -74,10 +74,9 @@
7474
<details>
7575
<summary><b>最新版本亮点</b></summary>
7676

77-
- **Codex managed config 支持更复杂 TOML**:继承的 `config.toml` 含 inline table array 时会正常渲染,不再因为 parsed dict value 报错。
78-
- **Fallback config copy 不再重复追加 features 段**:没有 TOML parser 时会原位更新已有 `[features]`,并正确识别 `[table]``[[array_of_tables]]` 边界。
79-
- **安装器会按需补 TOML parser**:Linux/macOS 和 Windows 安装器在没有 TOML reader 时自动安装 `tomli>=2.0.0`,也可用 `CCB_INSTALL_TOMLI=0` 跳过。
80-
- **Managed venv 依赖安装作用域正确**:release 安装会先在 managed venv 内安装 `tomli`,再处理可选 watchdog。
77+
- **Claude managed memory 不再重复项目规则**:managed `.claude/CLAUDE.md` 不再复制项目级 `CLAUDE.md`;Claude 仍会从工作目录原生读取它。
78+
- **Managed Claude memory 保留正确继承源**:真实 `~/.claude/CLAUDE.md``.ccb/ccb_memory.md` 和每个 agent 的 `.ccb/agents/<agent>/memory.md` 仍会进入 managed bundle。
79+
- **Memory source 加入可控开关**`load_memory_sources(..., include_provider_native_project=False)` 可跳过 provider-native project memory,默认行为仍保持包含。
8180

8281
完整历史见 [新版本记录](#新版本记录)
8382

@@ -330,6 +329,15 @@ ccb reinstall
330329
历史说明:下面较旧的发布记录里仍可能出现 `askd`、旧 flag 或已移除命令。这些内容仅作为 changelog 历史保留,不代表当前 CLI 入口。
331330

332331
<details open>
332+
<summary><b>v6.2.5</b> - Claude Managed Memory De-Duplication Hotfix</summary>
333+
334+
- 不再把项目级 `CLAUDE.md` 复制进 managed `.claude/CLAUDE.md`,让 Claude 只从工作目录读取一次。
335+
- managed Claude bundle 仍保留 provider user memory、CCB shared project memory 和 agent private memory。
336+
- `load_memory_sources` 增加 provider-native project memory 的 opt-out 开关,同时保留其他调用方默认包含的行为。
337+
338+
</details>
339+
340+
<details>
333341
<summary><b>v6.2.4</b> - Codex Managed Config TOML Hotfix</summary>
334342

335343
- 将 dict value 渲染为 inline TOML table,避免继承含 inline table array 的 Codex config 时 managed-home projection 崩溃。

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.2.4
1+
6.2.5

ccb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ backend_env = get_backend_env()
2121
if backend_env and not os.environ.get("CCB_BACKEND_ENV"):
2222
os.environ["CCB_BACKEND_ENV"] = backend_env
2323

24-
VERSION = "6.2.4"
24+
VERSION = "6.2.5"
2525
GIT_COMMIT = "release"
2626
GIT_DATE = "2026-05-11"
2727

lib/project_memory/sources.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def load_memory_sources(
3636
provider: str,
3737
extra_sources: tuple[ProjectMemorySource, ...] = (),
3838
include_missing: bool = True,
39+
include_provider_native_project: bool = True,
3940
) -> tuple[ProjectMemorySource, ...]:
4041
layout = _layout(project_root_or_layout)
4142
sources: list[ProjectMemorySource] = []
@@ -49,7 +50,7 @@ def load_memory_sources(
4950
)
5051
)
5152

52-
provider_path = provider_native_memory_path(layout, provider)
53+
provider_path = provider_native_memory_path(layout, provider) if include_provider_native_project else None
5354
if provider_path is not None:
5455
provider_source = _read_source(
5556
kind='provider_native_project',

lib/provider_backends/claude/launcher_runtime/home.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ def _materialize_claude_memory(
281281
agent_name=agent_name,
282282
provider='claude',
283283
extra_sources=extra_sources,
284+
include_provider_native_project=False,
284285
)
285286
warnings.extend(source.warning for source in sources if source.warning)
286287
rendered = render_memory_bundle(

test/test_project_memory.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,31 @@ def test_load_memory_sources_reads_from_project_root_not_workspace(tmp_path: Pat
113113
assert 'workspace-only memory' not in ''.join(content_by_kind.values())
114114

115115

116+
def test_load_memory_sources_can_skip_provider_native_project_memory(tmp_path: Path) -> None:
117+
project_root = tmp_path / 'repo'
118+
project_root.mkdir()
119+
_write_project_memory(project_root, 'shared memory\n')
120+
(project_root / 'CLAUDE.md').write_text('project claude memory\n', encoding='utf-8')
121+
agent_private_memory_path(project_root, 'Agent1').parent.mkdir(parents=True)
122+
agent_private_memory_path(project_root, 'Agent1').write_text('private memory\n', encoding='utf-8')
123+
124+
default_sources = load_memory_sources(project_root, agent_name='Agent1', provider='claude')
125+
skipped_sources = load_memory_sources(
126+
project_root,
127+
agent_name='Agent1',
128+
provider='claude',
129+
include_provider_native_project=False,
130+
)
131+
132+
assert [source.kind for source in default_sources] == [
133+
'ccb_shared',
134+
'provider_native_project',
135+
'agent_private',
136+
]
137+
assert [source.kind for source in skipped_sources] == ['ccb_shared', 'agent_private']
138+
assert 'project claude memory' not in ''.join(source.content for source in skipped_sources)
139+
140+
116141
def test_materialize_runtime_memory_bundle_writes_generated_bundle(tmp_path: Path) -> None:
117142
project_root = tmp_path / 'repo'
118143
workspace = tmp_path / 'worktree'

test/test_provider_hook_settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def test_prepare_provider_workspace_materializes_claude_memory_bundle_before_hoo
190190
assert text.startswith('# CCB Managed Agent Memory')
191191
assert 'system claude memory' in text
192192
assert 'shared ccb memory' in text
193-
assert 'project claude memory' in text
193+
assert 'project claude memory' not in text
194194
assert 'agent private memory' in text
195195

196196

test/test_provider_profiles.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1751,8 +1751,8 @@ def test_materialize_claude_home_config_writes_project_memory_bundle(tmp_path: P
17511751
assert 'user claude memory' in text
17521752
assert '## CCB Shared Project Memory' in text
17531753
assert 'shared ask memory' in text
1754-
assert '## Provider-Native Project Memory' in text
1755-
assert 'project claude memory' in text
1754+
assert '## Provider-Native Project Memory' not in text
1755+
assert 'project claude memory' not in text
17561756
assert '## Agent Private Memory' in text
17571757
assert 'reviewer private memory' in text
17581758

0 commit comments

Comments
 (0)