惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
Y
Y Combinator Blog
月光博客
月光博客
Blog — PlanetScale
Blog — PlanetScale
GbyAI
GbyAI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
雷峰网
雷峰网
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
有赞技术团队
有赞技术团队
博客园 - 司徒正美
V
Visual Studio Blog
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tailwind CSS Blog
Apple Machine Learning Research
Apple Machine Learning Research
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
A
About on SuperTechFans
The Cloudflare Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(codex): ignore tool descriptions in thread fingerprin...
chen-zhang-c · 2026-04-23 · via Recent Commits to openclaw:main

@@ -179,6 +179,44 @@ async function writeExistingBinding(

179179

});

180180

}

181181182+

function createThreadLifecycleAppServerOptions(): Parameters<

183+

typeof startOrResumeThread

184+

>[0]["appServer"] {

185+

return {

186+

start: {

187+

transport: "stdio",

188+

command: "codex",

189+

args: ["app-server"],

190+

headers: {},

191+

},

192+

requestTimeoutMs: 60_000,

193+

approvalPolicy: "never",

194+

approvalsReviewer: "user",

195+

sandbox: "workspace-write",

196+

};

197+

}

198+199+

function createMessageDynamicTool(

200+

description: string,

201+

actions: string[] = ["send"],

202+

): Parameters<typeof startOrResumeThread>[0]["dynamicTools"][number] {

203+

return {

204+

name: "message",

205+

description,

206+

inputSchema: {

207+

type: "object",

208+

properties: {

209+

action: {

210+

type: "string",

211+

enum: actions,

212+

},

213+

},

214+

required: ["action"],

215+

additionalProperties: false,

216+

},

217+

};

218+

}

219+182220

describe("runCodexAppServerAttempt", () => {

183221

beforeEach(async () => {

184222

tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-codex-run-"));

@@ -731,6 +769,76 @@ describe("runCodexAppServerAttempt", () => {

731769

});

732770

});

733771772+

it("resumes a bound Codex thread when only dynamic tool descriptions change", async () => {

773+

const sessionFile = path.join(tempDir, "session.jsonl");

774+

const workspaceDir = path.join(tempDir, "workspace");

775+

const params = createParams(sessionFile, workspaceDir);

776+

const appServer = createThreadLifecycleAppServerOptions();

777+

const request = vi.fn(async (method: string) => {

778+

if (method === "thread/start") {

779+

return threadStartResult("thread-existing");

780+

}

781+

if (method === "thread/resume") {

782+

return { thread: { id: "thread-existing" }, modelProvider: "openai" };

783+

}

784+

throw new Error(`unexpected method: ${method}`);

785+

});

786+787+

await startOrResumeThread({

788+

client: { request } as never,

789+

params,

790+

cwd: workspaceDir,

791+

dynamicTools: [

792+

createMessageDynamicTool("Send and manage messages for the current Slack thread."),

793+

],

794+

appServer,

795+

});

796+

const binding = await startOrResumeThread({

797+

client: { request } as never,

798+

params,

799+

cwd: workspaceDir,

800+

dynamicTools: [

801+

createMessageDynamicTool("Send and manage messages for the current Discord channel."),

802+

],

803+

appServer,

804+

});

805+806+

expect(binding.threadId).toBe("thread-existing");

807+

expect(request.mock.calls.map(([method]) => method)).toEqual(["thread/start", "thread/resume"]);

808+

});

809+810+

it("starts a new Codex thread when dynamic tool schemas change", async () => {

811+

const sessionFile = path.join(tempDir, "session.jsonl");

812+

const workspaceDir = path.join(tempDir, "workspace");

813+

const params = createParams(sessionFile, workspaceDir);

814+

const appServer = createThreadLifecycleAppServerOptions();

815+

let nextThread = 1;

816+

const request = vi.fn(async (method: string) => {

817+

if (method === "thread/start") {

818+

return threadStartResult(`thread-${nextThread++}`);

819+

}

820+

throw new Error(`unexpected method: ${method}`);

821+

});

822+823+

await startOrResumeThread({

824+

client: { request } as never,

825+

params,

826+

cwd: workspaceDir,

827+

dynamicTools: [createMessageDynamicTool("Send and manage messages.", ["send"])],

828+

appServer,

829+

});

830+

const binding = await startOrResumeThread({

831+

client: { request } as never,

832+

params,

833+

cwd: workspaceDir,

834+

dynamicTools: [createMessageDynamicTool("Send and manage messages.", ["send", "read"])],

835+

appServer,

836+

});

837+838+

expect(binding.threadId).toBe("thread-2");

839+

expect(request.mock.calls.map(([method]) => method)).toEqual(["thread/start", "thread/start"]);

840+

});

841+734842

it("passes configured app-server policy, sandbox, service tier, and model on resume", async () => {

735843

const sessionFile = path.join(tempDir, "session.jsonl");

736844

const workspaceDir = path.join(tempDir, "workspace");