把一次做到一半的重构从 Claude Code 搬到 Codex,看上去像个文件格式转换的活儿——两个 CLI 都把每次会话以只追加的 JSONL 存在磁盘上。其实不是。一条 assistant 轮次并不是“发生了什么”的记录;它是一项断言,其成立条件是一份系统提示、一套工具 schema、一个模型和一份热缓存,而接收方一样都没有。于是逐字重放交出去的不是领先起跑,而是一段虚假记忆。真正可以承载交接的层只有四个,而其中每一个奏效的做法,都把逐字记录扔掉,只留下接收方能对着仓库重新核验的东西。
一览
“我怎么在两个智能体之间共享会话?”这个问题有四个真实答案,而它们并不是同一个想法的几种实现。它们与会话本身的距离各不相同,而这个距离就是全部的权衡。
层 它是什么 什么会过去 代价是什么
1 · 指令文件 AGENTS.md、CLAUDE.md长期有效的项目规则,每次启动都重新读取 关于这一次 会话的信息,一点都不过去
2 · 交接产物 一份写下来的状态文件 决策、未决线索、下一步 只有有人写下来的那部分
3 · 逐字记录转换 对磁盘上 JSONL 的 parser 与 writer 每一轮,按顺序,压成散文 工具调用、标识符、缓存——外加一个厂商随时可能改的格式
4 · 实时协议或共享存储 ACP 客户端、A2A 对端、MCP 记忆服务器 持续的共享状态 两端都必须已经会说这门话
The four layers a coding-agent session can be handed over on
Agent A on the left and Agent B on the right, connected by four horizontal lanes. Layer one is the instruction file, AGENTS.md or CLAUDE.md, which carries standing project rules and nothing about the session. Layer two is the handoff artifact, a written state file, which carries decisions and the next step but only what someone wrote down. Layer three is transcript conversion, a parser and writer pair over the on-disk JSONL, which carries turn order and prose but drops tool calls, identifiers and the cache. Layer four is a live protocol or shared store such as an ACP client or an MCP memory server, which carries continuous state but requires both ends to speak it.
MORE PORTABLE, LESS OF THIS SESSION
MORE OF THIS SESSION, LESS PORTABLE
AGENT A
Claude Code
holds the session
AGENT B
Codex CLI
needs to continue
LAYER 1 — INSTRUCTION FILE
AGENTS.md / CLAUDE.md
committed, re-read at startup
WHAT CROSSES
Standing project rules —
nothing about this session
LAYER 2 — HANDOFF ARTIFACT
A written state file
decisions, next step, gotchas
WHAT CROSSES
Claims the receiver can
re-verify against the repo
LAYER 3 — TRANSCRIPT CONVERSION
parser to writer, over JSONL
every turn, in order
WHAT CROSSES
Prose only — tool calls, ids
and the cache do not survive
LAYER 4 — LIVE PROTOCOL / STORE
ACP client, MCP memory
a shared substrate, not a file
WHAT CROSSES
Continuous state — if both
ends already speak it
越往下走,这次会话过去得越多——而能在其间通行的智能体组合也越少。
给它们打分,问题的形状就浮现出来了。有一行承载了整个会话。它在其余每一根轴上都是最弱的一行,而这并不是一个等着被补上的实现缺口。
The four handoff layers scored on five axes
A matrix of four transfer layers against five axes: cross-vendor reach today, how much of this session it carries, whether the receiver can verify what it is told, whether it survives a version bump, and how little setup it needs. The instruction file and the handoff artifact score strongly on everything except carrying the session. Transcript conversion is the only row that carries every turn, and it is weak on every other axis. Live protocols and shared stores sit in the middle throughout.
One row carries the session. It is weak everywhere else.
Cross-vendor today
Carries this session
Receiver can verify it
Survives a version bump
Setup cost to start
Instruction file
30+ agents
None of it
It is in the repo
Plain text
One file
Handoff artifact
Any agent
What you wrote
Re-checkable
Plain text
You write it
Transcript conversion
Per-pair code
Every turn
Asserted only
Internal format
Run a tool
Live protocol / store
If both speak it
Facts, not turns
Depends
Versioned spec
Run a server
Strong
Partial
Weak
对逐字记录的忠实度,与对接收方的有用程度,指向相反的方向。
会话究竟存在哪里
Where each coding agent keeps its session on disk
Three columns of on-disk session storage. Claude Code writes JSONL under a projects directory keyed by encoded working directory, with subagent transcripts in their own sidechain files. Codex CLI writes date-partitioned rollout JSONL files that its context manager replays on resume. Gemini CLI writes session JSON under a temporary project directory. Below, a band notes the shape all three share: append-only JSONL, one line per turn, each linked to its parent. A final highlighted band notes what they do not share: entry semantics, with Anthropic documenting its format as internal and able to change on any release.
AGENT
Claude Code
~/.claude/projects/
<encoded-cwd>/
<session-id>.jsonl
Each line carries uuid,
parentUuid, sessionId, cwd.
Subagents get their own
sidechain files.
AGENT
Codex CLI
~/.codex/sessions/
YYYY/MM/DD/
rollout-<ts>-<id>.jsonl
A rollout stream of response
items. The context manager
replays them to rebuild
state on resume.
AGENT
Gemini CLI
~/.gemini/tmp/
<project>/chats/
session-*.json
A native ACP agent, so an
editor can drive it — and
it still keeps its own
private session file.
WHAT ALL THREE SHARE
Append-only JSONL, one line per turn, each line linked to its parent.
WHAT NONE OF THEM SHARE
Entry semantics. Anthropic documents its format as internal to Claude Code
and subject to change between versions — a parser can break on any release.
三个智能体,三条路径,一种形状——而底下没有共通的含义。
三大 CLI 智能体在存储策略上几乎一模一样。Claude Code 写 ~/.claude/projects/<project>/<session-id>.jsonl,其中 <project> 是把工作目录路径里的非字母数字字符换成连字符得来的;每一行是一个 JSON 对象,对应一条消息、一次工具使用或一条元数据条目,子智能体另有自己的 sidechain 逐字记录。Codex CLI 写 ~/.codex/sessions/YYYY/MM/DD/rollout-<timestamp>-<uuid>.jsonl,这是一条 rollout 流,运行 codex resume 时由它的上下文管理器重放以重建模型状态。Gemini CLI 把会话 JSON 放在 ~/.gemini/tmp/ 下。三者都是本地优先、只追加,并且能用 jq 直接读。
正是这份相似性,让“这就是个格式转换问题”的直觉如此诱人;而有两个有据可查的事实,应该在你写下第一行代码之前就把这个直觉打消。
第一,这个格式不是契约。Anthropic 自家的会话文档写着,条目格式“是 Claude Code 内部的,会在版本之间发生变化,因此直接解析这些文件的脚本可能在任何一次发布中失效”,并让你改用 /export 或那些脚本接口。一个建立在原始 JSONL 之上的转换器,并不是在对接一个格式;它依赖的是一处实现细节,而其厂商已经明确保留了随时更改它的权利。
第二个事实更微妙,也更说明问题。Claude Code 可以恢复一个在别的项目目录里开始的会话 ID——但那次跨项目查找只在恰好只有一个 其他项目持有该 ID 的逐字记录时才解析成功,因此一份手工拷贝出来的副本会让它报告“找不到”,而不是恢复某个随意的拷贝 。厂商把逐字记录当成一个身份,而不是一份可搬运的文档。拷贝文件并不等于拷贝会话,而工具就是照着这个前提造的。
第一层——指令文件,它一点会话都不承载
AGENTS.md 是这个生态里最接近既成标准的东西。OpenAI 在 2025 年 8 月发布了它,随后连同 MCP 一起交给了 Linux 基金会旗下的 Agentic AI Foundation;到 2026 年,已有 30 多个智能体会读它,它出现在 6 万多个仓库里。Claude Code 是那个显眼的例外——截至 2026 年 8 月它仍然加载 CLAUDE.md,解法是用一行 import 让一个文件指向另一个,而不是维护两份。
Fifteen months of cross-agent standards
Three parallel timelines from June 2025 to August 2026. AGENTS.md was released by OpenAI in August 2025, transferred to the Linux Foundation's Agentic AI Foundation in late 2025, and reached 60,000 or more repositories by May 2026. The Agent Client Protocol was created by Zed in August 2025 and gained a registry co-launched with JetBrains in January 2026, listing 40 or more agents by 2026. A2A went to the Linux Foundation in June 2025, passed 150 organisations at its one-year mark in April 2026, and reached version 1.0. A footnote records that Claude Code still reads CLAUDE.md as of August 2026.
The plumbing standardised. The session did not.
AGENTS.md
Released by OpenAI
To the Linux Foundation
60k+ repos
ACP · client↔agent
Created by Zed
Registry, with JetBrains
40+ agents listed
A2A · agent↔agent
To the Linux Foundation
150+ orgs at one year
v1.0
JUN 2025
JAN 2026
AUG 2026
Claude Code still reads CLAUDE.md as of August 2026 — point one file at the other with an import.
指令、编辑器集成与任务委派,都在十五个月内完成了标准化。会话逐字记录没有。
你当前会话的任何内容都不会经由这一层过去,而这恰恰是它最值得先动手的原因。在你动手造桥之前,先盘一盘你到底在反复解释些什么。其中很大一部分——构建命令、那个碰不得的目录、那个在 CI 上很不稳定的测试、这套代码库为什么用 advisory lock——都是长期有效的知识,只是被错误地归档成了情景性的。它不需要在会话之间传递,因为它一开始就不该被限定在某次会话里。最便宜的会话迁移,是那次你根本不需要做的迁移。
做完这次盘点之后剩下的,才是真正属于当前任务的部分,也才是真正的交接问题。它比看上去小得多。
第二层——交接产物,以及让它奏效的那条规则
从业者实际在跑的那个模式并不花哨:交出去的智能体写一份状态文件,接手的智能体被要求“在做任何事之前先完整读一遍”。人们会在配额中途耗尽、下一步换个模型更合适、或者工作要交给另一个人的时候用到它。公开的各个版本都收敛到相似的形状——若干固定小节,在状态发生跃迁 时更新而不是按定时器更新,并附一条硬性规定:在信任上一步之前先重新核验它。
那条“重新核验”的规则并不是给这个模式外挂的安全带。它就是 这个模式本身,而且可以推广成一条能逐行套用的检验:交接文件里的每一行,要么是一个事实、后面跟着重新核验它的命令,要么是一个决策、并被明确标记为决策。没有第三类。既不是事实也不是决策的,都是装饰;而交接悄悄出错的地方正是装饰——接手的智能体把一句过期的断言当成了确凿事实,然后在上面继续盖楼。
Every line in a handoff file is either re-checkable or a labelled decision
Two columns. On the left, three things a handoff file claims: that a migration is applied, that a named test is the failing one, and that advisory locks were chosen over Redis. On the right, what lets the receiving agent trust each: a single command for the first two, and for the third, nothing — it is a decision, and must be labelled as one so the receiver either accepts it or re-opens it rather than discovering the difference by testing.
WHAT THE HANDOFF CLAIMS
WHAT LETS THE RECEIVER TRUST IT
FACT
Migration 0042 is applied on dev
added the audit_log table
ONE COMMAND
psql -c '\dt' | grep audit_log
Costs the receiver two seconds.
FACT
test_retry is the one still failing
the other four now pass
ONE COMMAND
pytest tests/test_sender.py -x
Disagreement shows up immediately.
DECISION
Advisory locks, not Redis
because the lock has to die
with the transaction
NOTHING RE-CHECKS THIS
So label it a decision, not a fact.
The receiver either accepts it or re-opens
it. What it must never do is discover the
difference halfway through the work.
事实配一条命令。决策配一个标记。剩下的都是装饰。
写出来,整份东西一屏就装得下:
# HANDOFF 2026-08-28T14:20Z · from: claude-code · to: codex
## Goal
Retry-with-backoff on the email sender. Must not double-send.
## Verified facts — each line names the command that re-checks it
- migration 0042 applied psql -c '\dt' | grep audit_log
- 4 of 5 sender tests pass pytest tests/test_sender.py
- lint clean on this branch ruff check services/email
## Decisions — nothing re-checks these; accept or re-open
- Postgres advisory locks, not Redis: the lock must die with the transaction.
- Backoff capped at 5 attempts: the SLA is 15 minutes, not durability.
## Open
- test_retry fails: the fake clock does not advance inside the retry loop.
## Do not touch
- services/billing/* — unrelated migration in flight.
有两处细节值得留意。按状态跃迁而不是按定时器更新之所以重要,是因为跃迁就是 那些事件;每五分钟写一次的文件,会以没人察觉得到的方式过期,而在测试套件转绿那一刻写下的文件,要么是最新的,要么一眼就看得出不是。而“不要动”那一节做的事是任何摘要都做不到的——它传递了一条约束,接手的智能体没有任何办法从仓库里推断出来。
第三层——那个把看上去最宝贵的数据删掉的转换器
在 CLI 之间搬会话的工具确实存在,而它们的架构正是你会设计出来的那一种:每个智能体一个 parser、每个智能体一个 writer,中间夹一个中立的中间形式,于是新增一个 CLI 意味着两边各加一个模块,而不是往一张 N×N 的矩阵里再填一格。一个公开的实现大约 600 行 Python,没有任何网络部分——它读那三个会话目录,然后写出目标方的格式。
The transcript conversion pipeline and what it deliberately discards
A left-to-right pipeline: the source agent's JSONL file on disk, a per-agent parser, a neutral session form holding ordered turns plus prose summaries of tool calls, a per-agent writer, and the target agent's resumable session. A dashed arrow drops from the parser into a band below labelled dropped on purpose, listing tool use blocks, tool result blocks, reasoning traces, absolute paths and credentials, the warm prompt cache, and the system prompt those turns answered.
SOURCE
Claude Code
append-only
.jsonl on disk
PARSER
per agent
one module
per CLI
NEUTRAL FORM
NeutralSession
ordered turns, plus
prose summaries of
the tool calls
WRITER
per agent
emits target
format
TARGET
Codex
resumable
DROPPED ON PURPOSE
The receiving model needs understanding, not replay.
• tool_use blocks
• tool_result blocks
• reasoning traces
• absolute paths, credentials
• the warm prompt cache
• the system prompt behind them
"edited services/email/sender.py:82-94" ← what survives instead
流水线的中立形式是散文。逐字记录里结构化的那部分,在进来的路上就被丢掉了。
真正有意思的决定,是这个中立形式里装了什么:一份有序的 user 与 assistant 轮次列表,外加工具调用的散文摘要 。工具调用并不会被跨智能体映射——它们被剥掉,然后被叙述出来。一次记录在案的编辑,变成挨着 assistant 轮次的一句 edited services/email/sender.py:82-94。给出的理由是:接收端的模型需要的是理解,不是重放能力。
把这句话读成一份供认,它就是这整个领域里最有用的一句。逐字记录中最丰富、最结构化、最忠实的那一部分——关于智能体究竟做了什么的精确记录——正是一个能用的转换器有意销毁的部分。这不是因为排期紧而抄的近路。这是正确的设计,而其中的原因值得说清楚。
厂商实际交付的东西也印证了这一点。Claude Code 自己的 /export 产出的是给人读的渲染后逐字记录,而不是给另一个智能体摄入的结构化产物;它记录在案的那些结构化接口——claude -p --output-format json、hooks 收到的 transcript_path、Agent SDK——都是用来对你自己正在运行的会话做脚本处理的,而不是把历史交给另一家厂商的 CLI。没有人在交付那座无损的桥,因为压根没有一座讲得通的桥可交付。
在过桥的路上,什么会坏掉
Three things that break when a transcript crosses to another agent
Three columns. The tool schema column notes that recorded tool calls name tools the receiving agent does not have, so a replayed call is an instruction it cannot run. The system prompt column notes that every assistant turn answered instructions the receiver never read, so the turn keeps its authority and loses its reason. The cache and environment column notes that the prompt cache is keyed to one provider's exact prefix and that flags such as the MCP config and added directories were never in the transcript at all.
BREAKS FIRST
The tool schema
A recorded call names Edit;
the receiver has apply_patch.
Every tool_result points at a
tool_use id that no longer
resolves, so a replayed call
is an unrunnable instruction.
BREAKS QUIETLY
The system prompt
Each assistant turn answered
instructions the receiver
never read.
The turn keeps its authority
and loses its reason — which
is the definition of a
false memory.
NEVER MADE THE FILE
Cache and environment
The prompt cache is keyed to
one provider's exact prefix.
MCP config, added directories
and settings files were never
in the transcript — even a
same-agent resume asks you
to pass them again.
三处相互独立的失效,而只有第一处是格式问题。
工具 schema 最先坏,也坏得最显眼。一份 Claude Code 逐字记录里含有指名该 harness 工具的 tool_use 块,每个都带一个 id,还有引用这些 id 的 tool_result 块。Codex 的工具面不一样。你只有两个选择,而且都很糟:逐个工具做映射——这是一件组合爆炸的活儿,任何一边新增一个工具或改一个参数名它就散架;或者把这些调用删掉。转换器选择删掉,那些悬空的 id 就是原因。
系统提示 坏得悄无声息,而这正是真正让你付出代价的那处失效。那份逐字记录里的每一条 assistant 轮次,都是在回应接收方从未读过的指令——一份不同的 harness 提示、不同的工具描述、另一个模型的性情。被重放进一个新智能体之后,这些轮次以 assistant 角色抵达,而那正是模型当作“自己过去的推理”来对待的角色。这条轮次保留了它的权威,却丢掉了它的依据。接手的智能体现在“记得”自己做过并没有做过的工作,依据的是它从未见过的规则,而且没有任何机制去怀疑它。这在精确的意义上就是虚假记忆:被笃信、在结构上与真记忆无从区分、而且是错的。
缓存与环境 则根本没进过那个文件。Claude Code 的文档就连对自家的恢复也说得很直白:恢复后的会话不会还原 --mcp-config、--settings、--plugin-dir、--fallback-model,也不会还原用 --add-dir 追加的目录;你得重新传一遍。如果同一个智能体、同一台机器上的恢复都无法从逐字记录里重建环境,跨厂商的那种就更不可能。经济账也咬在同一个地方:当你恢复一个闲置约一小时、且超过 10 万 token 的 Claude Code 会话时,它之所以提议做摘要,正是因为提示缓存已经过期,而无论你选哪个选项,下一次请求都会把完整历史重新处理一遍。跨智能体的迁移天然要付这笔账——你是在把整段对话重新发给一个从未见过它的厂商,没有任何前缀可命中。
这三处里只有第一处是格式问题。另外两处在你发明的任何格式下都会存活,这也正是为什么“该有人把这个标准化一下”并不是它听起来的那个答案。
第四层——那些实时选项,以及每一个究竟是干什么用的
Three live topologies for sharing agent state, and what each one does not do
Three panels. The first shows the Agent Client Protocol: an editor at the top driving Claude Code through an adapter and Gemini CLI natively; it solves one editor driving many agents but session identifiers still belong to the agent that minted them. The second shows A2A: a client agent delegating a task under a context identifier to a remote agent, which returns artifacts; it crosses vendor boundaries but transfers deliverables rather than the peer's history. The third shows a shared MCP memory server that two agents both read and write; it gives durable cross-agent facts but stores only what was deliberately saved.
TOPOLOGY 1
ACP — client to agent
Zed / JetBrains
Claude Code
via adapter
Gemini CLI
native
SOLVES
One editor drives many agents.
session/load replays history
into the client for display.
DOES NOT SOLVE
A session id belongs to the
agent that minted it. Two
agents in one window are
still two sessions.
TOPOLOGY 2
A2A — agent to agent
Client agent
task + contextId
Remote agent
artifacts
SOLVES
Delegation across vendor and
org boundaries. One contextId
groups the related tasks.
DOES NOT SOLVE
It returns artifacts, not the
peer's reasoning. The remote
agent's history stays remote,
and that is the design.
TOPOLOGY 3
MCP — a shared store
Claude Code
Codex
Memory server
SOLVES
Durable facts both agents read
and write, across machines and
across sessions.
DOES NOT SOLVE
It holds what someone chose
to save. That is a memory,
not a transcript — and the
choosing is the hard part.
三个真正实时的选项。没有一个在搬运逐字记录,也没有一个想要这么做。
ACP 标准化的是接口,不是状态
Zed 的 Agent Client Protocol 创建于 2025 年 8 月,它对编辑器与智能体做的事,正是 LSP 对编辑器与语言做过的事:基于 stdio 的 JSON-RPC,于是任何客户端都能驱动任何智能体。JetBrains 加入进来,两家在 2026 年 1 月共同推出了一个注册表,已列出 40 多个智能体。Claude Code 与 Codex CLI 都是通过 Zed 构建的适配器接入的;Gemini CLI 是原生支持。
那几个会话方法看着很有希望,然后并没有给出你想要的东西。session/new 开一个上下文,session/load 重连到一个已存储的会话,session/resume 则是不重放地重连。但"load"的含义是由智能体 把对话以一串 update 通知重放给客户端 ,好让编辑器把线程重新画出来——而且它要等每一条条目都推送完毕才回应这次请求。历史归产生它的那个智能体所有;客户端是被同步到最新,而不是被交付了状态。在同一个 Zed 窗口里并排跑 Claude Code 和 Codex,你得到的是两个线程里的两个智能体,不是一个共享的会话。ACP 解决的是编辑器到智能体,那确实是一个实打实的 N×M 问题;它并没有声称解决了智能体到智能体。
有一个命名陷阱值得点出来:这并不是唯一的 ACP。还存在过一个 Agent Communication Protocol,它在 2025 年 7 月被交给 Linux 基金会,随后并入了 A2A——搜索结果至今仍然乐此不疲地把两者混为一谈,所以在采纳一个页面的建议之前,先确认它说的是哪一个。
A2A 传递的是交付物,而且是刻意如此
A2A 已在 Linux 基金会治理下发布 1.0 版;它于 2025 年 6 月被贡献出来,并在一周年时超过 150 家组织。它的模型是委派:一个客户端智能体把任务发给一个远端智能体,由服务端生成的 contextId 把相关任务归拢成一次交互,结果以产物的形式回来。不会回来的是远端智能体的推理或历史——对端在设计上就是不透明的,因为这件事的全部意义就在于跨越一条组织边界,在那条边界上你既不能、也不该去检视对方的内部。对于“让那个智能体去做这件事”,A2A 是对的协议;对于“变成我”,它在结构上就是错的那个。
共享记忆搬的是事实,而“选什么”才是真正的工作
MCP 记忆服务器是今天最实用的实时选项,因为任何 MCP 客户端都能连上一台。在 Codex 里写下一个事实,在 Claude Code 里读到它。各家实现在存储方式上有差异——一端是带 URL 寻址的文件式 markdown,另一端是托管的语义存储——但形状是共通的:一个两个智能体都读写的持久池。
问题和第二层是同一个,只不过穿得体面些。记忆服务器保存的是有人特意存下来的内容,而“特意”才是难的那部分。把 markdown 文件换成数据库,并不能替你决定什么该放进去。每一个实时选项都从不同方向收敛到同一个结论:智能体共享的是事实 ,不是轮次 。
什么时候选哪个
情形 该用 为什么
你每次会话都在重复解释同一件事 指令文件 它从来就不是会话状态;别再传它了
配额中途耗尽,要换个 CLI 接着做 交接产物 几分钟就能写完,任何两个智能体之间都能用,且可复核
把工作交给同事 交接产物,外加那条分支 人需要的是决策,不是按键记录
你想在编辑器里看到同一个线程 ACP 客户端 一个界面统管多个智能体——但每个智能体仍是一个会话
有些事实应该比任何一次会话活得久 MCP 记忆服务器 持久、跨客户端,在团队规模下值得那点搭建成本
让另一个团队的智能体做一块工作 A2A 跨信任边界的委派;回来的是产物
你想把字面意义上的对话搬过去 再想想 接收方继承了权威,却没继承依据
如果只从本文带走一个操作习惯:边做边写 那份交接文件,而不是等到需要用的时候才写。在配额耗尽那一刻拼凑出来的文件,是由一个已经丢了线索的智能体写的;在每次状态跃迁时更新的文件,是由一个还抓着线索的智能体写的。
常见问题
我能不能把 .jsonl 拷到另一台机器上再恢复?
不能指望它可靠,而且 Claude Code 就是照着拒绝这件事造的。它的跨项目会话查找只在恰好有一个项目持有该 ID 的逐字记录时才解析成功,因此一份手工拷贝出来的副本会报告“找不到”,而不是恢复某个随意的拷贝。再加上条目格式被明确记为内部的、可能在任何一次发布中变化,拷文件是所有选项里最不耐久的那个。
有没有官方的跨智能体会话格式?
没有,而且这个缺口不是疏忽。AGENTS.md 标准化了指令,ACP 标准化了编辑器到智能体的通信,A2A 标准化了委派。没有一个去标准化逐字记录,因为一份逐字记录的含义取决于一份系统提示和一套工具 schema,而这两样在构造上就是各个智能体特有的。
ACP 能让我的编辑器把 Claude Code 会话交给 Codex 吗?
不能。ACP 的会话 ID 由创建它的那个智能体铸造并存储,而 session/load 是把历史从智能体重放给客户端用于显示。在同一个 Zed 窗口里跑两个智能体,你得到的是并排的两个线程,不是一个共享的会话。
把 /compact 的输出粘过去够不够?
那是第二层的马虎版。压缩摘要是没有出处的散文:接收方分不清哪些行是当下的事实、哪些是过期的断言。给每个事实性论断后面补上重新核验的命令,并把决策标出来,同一份摘要就成了一次真正的交接。
有了 MCP 记忆服务器,还需要交接文件吗?
它免去了你重述长期事实的必要,那其实是用更好的管道去做第一层的活。它并不捕捉你正做到一半的那个任务的状态——你刚刚核验了什么、你决定了什么、什么还坏着。那些仍然得你自己写下来。
更好的工具最终会让无损迁移成立吗?
格式转换会不断改进,而且会继续丢掉工具调用。那三处失效里有两处——从一份外来系统提示继承来的权威,以及只存在于某一家厂商那一侧的缓存——是语言模型消费上下文的方式所固有的性质,而不是某个序列化器的缺陷。