最近 Anthropic 官方放了一支 Building the future of agents with Claude 的對談,由 Alex Albert(Claude Relations)、Brad Abrams(Claude Developer Platform PM)、Katelyn Lesse(Engineering Lead)三人主持。12 分鐘左右,涵蓋 Claude Developer Platform 改名、agent 的定義、unhobble the model、Claude Code SDK 作為 general-purpose agentic harness、context pruning、agentic memory primitive、observability。
我在 Mac 上跑一個叫 cc-memory-project 的個人 agent 環境(從 OpenClaw workspace 演化),有自製的 hybrid memory search、knowledge graph、cron → flag → SessionStart hook pipeline。看完對談做了一些對映,挑兩個有具體 patch 落地的記錄一下。
五點對映
| 對談重點 | 我的個人 agent 現況 | 落地動作 |
|---|---|---|
| Unhobble the model — scaffolding 在新模型上會變成 liability | spec/ 三檔 + AGENTS.md / CLAUDE.md 約 800 行 | 砍 6 段過時 scaffolding(Group Chats / Heartbeats / 返工循環段移走 / MM 從主力改 fallback / 工具決策改 reference / OpenClaw sync 段濃縮)約 -1050 tokens |
| SDK 是 general-purpose agentic harness | 用 Claude Code 本身 + cron/hook/skill 自製 harness | 不需動 |
| Context pruning + tombstone | memory-archive.py 把舊月份 section 直接刪掉 | 加 tombstone 留痕跡(第一個 patch) |
| Agentic memory primitive | hybrid search + graphify + hall taxonomy + always-on recall | 不需動,方向對 |
| Observability for long-running tasks | SessionStart hook prompt-budget-telemetry 已寫 JSONL | 升級為結構化 event(第二個 patch) |
Patch 1:Tombstone for archive_timeline
scripts/memory-archive.py 的 archive_timeline 會把 MEMORY.md 裡 ### 2026-XX 這種舊月份 section 搬到 memory/timeline-archive.md。原本邏輯是直接刪除:
new_text = text
for s in reversed(sections_to_archive):
new_text = new_text[:s["start"]] + new_text[s["end"]:]
問題:搬走後 MEMORY.md 完全不留線索,下次 LLM 開 session 讀 MEMORY.md 不知道「曾經有 March 的紀錄被歸檔」。
對映影片裡 Brad 描述 Claude Developer Platform 的 context pruning:移除舊 tool calls 時保留一行 tombstone marker 給模型線索(“the tool results for the search call were here, and they’ve been removed”)。同思路套到 timeline archive:
archived_at = today.isoformat()
new_text = text
for s in reversed(sections_to_archive):
tombstone = (
f"### {s['ym']} _[archived → memory/timeline-archive.md "
f"on {archived_at}, {s['lines']} lines]_\n\n"
)
new_text = new_text[:s["start"]] + tombstone + new_text[s["end"]:]
效果:歸檔後在原位置留一行
### 2026-03 _[archived → memory/timeline-archive.md on 2026-05-09, 12 lines]_
LLM 看到就知道 “March 不是不存在,是已經歸檔了”,要的話可以 Read 原檔。
8 行的小 patch,但 mental model 從 “delete” 變成 “tombstone” 意義不一樣。
Patch 2:Prompt budget alert 升級為結構化 event
我有一個 SessionStart hook 量「context 檔案 token 總量」(CLAUDE.md / SOUL.md / AGENTS.md / USER.md / MEMORY.md / MEMORY_COMPACT.md 加總),超 12000 tokens 就警告。原本警告長這樣:
Prompt budget alert: spec files total 13662 tokens (budget 12000).
1. python3 .../memory-archive.py --mode both (cheap, mechanical)
2. If still over: /curate-memory consolidate (LLM, semantic)
兩個問題:
- JSONL log 沒有
over_budget: true之類欄位,下游想 alert 要自己 grep 字串 - Hint 不準確 —
memory-archive.py只動memory/目錄不動MEMORY.md的 spec 段。如果超標來源是MEMORY.md本體(事實上就是,我的 6800 tokens 一半在MEMORY.md),跑 archive 沒效果
呼應影片裡 Katelyn 講的 observability:long-running task 要能 audit、要能 steer、要能 tune prompt。這個 alert 是個微型 observability 端點,但提供的訊號太粗糙。
升級之後:
Prompt budget alert: context files total 13662 tokens (budget 12000, over by 1662).
Top contributors: MEMORY.md=6829, CLAUDE.md=2393, AGENTS.md=2166
Hint: archive can't shrink these files. Run /curate-memory consolidate or trim spec/CLAUDE.md/SOUL.md manually.
JSONL 加結構化欄位:
{
"event": "budget_alert",
"over_budget": true,
"over_by": 1662,
"top_files": [
{"name": "MEMORY.md", "tokens": 6829},
{"name": "CLAUDE.md", "tokens": 2393}
],
"archivable_memory_sections": 0
}
archivable_memory_sections 是新加的——hook 自己掃 MEMORY.md 看有沒有 ### YYYY-MM 舊月份 section,沒有就不推薦跑 archive。從「不分情境推 archive」變成「先看症狀再開藥」。
反向比較:哪些不需要學
不是所有對談重點都需要學。我的 hybrid search(BM25 + jieba CJK tokenize + temporal × hall boost)、knowledge graph 自動建立的 1-hop 關聯、MemPalace-inspired hall taxonomy(hall_facts / events / discoveries / preferences / advice)、Source-First 事實查證紀律——這些影片沒展示,我做得相對完整。
差異在分工:他們的 memory primitive 是 model 自己寫筆記給自己讀;我現在是 user-curated(journal + curate-memory skill)+ always-on proactive recall hook 自動把 search 結果注入 prompt。換個角度看,hybrid search + always-on recall = 「我們的 memory primitive」,只是讓 cron 跟 hook 而非 model self-tool 來驅動。
收尾
對談裡 unhobble 主軸最有感。Agent 隨時間累積規則,每一條當下都有理由,但要砍掉很難,就像 OOP 累積 abstraction 後沒人敢動。對談給我一個 review 視角:用「這條規則在新一代模型上是 liability 還是 asset」當篩子,比「這條規則合不合理」好用。
兩個 patch 都不大(一個 8 行、一個 30 行),但思路到位就值得寫下來。Tombstone 那個會 backport 到我之前公開的 openclaw-workspace-template,用同一套 harness 的人應該也用得上。
對談連結:
