Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(codex): 区分 native fork 与 legacy fork 参数
DavidShenc9b337fd2104
diff --git a/packages/maker-core/src/agents/codex/index.test.ts b/packages/maker-core/src/agents/codex/index.test.tsindex 8c93a0e024..d7c9896382 100644--- a/packages/maker-core/src/agents/codex/index.test.ts+++ b/packages/maker-core/src/agents/codex/index.test.ts@@ -22438,7 +22438,6 @@ describe('CodexAgent.forkSdkSession', () => {expect(host.request).toHaveBeenCalledWith(Method.ThreadFork, {threadId: 'source-thread-id',lastTurnId: 'turn-at-boundary',- persistExtendedHistory: true,excludeTurns: true,cwd: '/repo',});@@ -22476,7 +22475,6 @@ describe('CodexAgent.forkSdkSession', () => {expect(host.request).toHaveBeenCalledWith(Method.ThreadFork, {threadId: 'imported-source-thread',lastTurnId: 'turn-at-boundary',- persistExtendedHistory: true,excludeTurns: true,});});diff --git a/packages/maker-core/src/agents/codex/index.ts b/packages/maker-core/src/agents/codex/index.tsindex 93c8b8fb79..890c47fc49 100644--- a/packages/maker-core/src/agents/codex/index.ts+++ b/packages/maker-core/src/agents/codex/index.ts@@ -13597,7 +13597,7 @@ export class CodexAgent extends BaseAgent {);const params: ThreadForkParams = {threadId: opts.sourceSdkSessionId,- persistExtendedHistory: true,+ ...(!usedNativeForkAnchor ? { persistExtendedHistory: true } : {}),...(usedNativeForkAnchor ? { lastTurnId } : {}),// 响应体瘦身:fork 后 Cindy 自己的会话数据负责历史展示,thread.turns 全量// 回传只会撑爆单行上限。老 daemon 不认识该字段则保持 legacy 行为 —— 此时