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

推荐订阅源

MongoDB | Blog
MongoDB | Blog
J
Java Code Geeks
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
DataBreaches.Net
腾讯CDC
GbyAI
GbyAI
I
InfoQ
博客园 - Franky
G
Google Developers Blog
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Visual Studio Blog
Vercel News
Vercel News
博客园_首页
MyScale Blog
MyScale Blog
Martin Fowler
Martin Fowler
N
Netflix TechBlog - Medium
V
V2EX
T
The Blog of Author Tim Ferriss
M
MIT News - Artificial intelligence
雷峰网
雷峰网
H
Hackread – Cybersecurity News, Data Breaches, AI and More
大猫的无限游戏
大猫的无限游戏
The GitHub Blog
The GitHub 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): project user MCP servers into app-server thre...
steipete · 2026-05-14 · via Recent Commits to openclaw:main

@@ -3,6 +3,7 @@ import {

33

isActiveHarnessContextEngine,

44

type EmbeddedRunAttemptParams,

55

} from "openclaw/plugin-sdk/agent-harness-runtime";

6+

import { buildCodexUserMcpServersThreadConfigPatch } from "openclaw/plugin-sdk/codex-mcp-projection";

67

import {

78

CODEX_GPT5_HEARTBEAT_PROMPT_OVERLAY,

89

renderCodexPromptOverlay,

@@ -76,6 +77,8 @@ export async function startOrResumeThread(params: {

7677

}): Promise<CodexAppServerThreadLifecycleBinding> {

7778

const dynamicToolsFingerprint = fingerprintDynamicTools(params.dynamicTools);

7879

const contextEngineBinding = buildContextEngineBinding(params.params);

80+

const userMcpServersConfigPatch = buildCodexUserMcpServersThreadConfigPatch(params.params.config);

81+

const userMcpServersFingerprint = fingerprintUserMcpServersConfigPatch(userMcpServersConfigPatch);

7982

let binding = await readCodexAppServerBinding(params.params.sessionFile, {

8083

authProfileStore: params.params.authProfileStore,

8184

agentDir: params.params.agentDir,

@@ -102,6 +105,13 @@ export async function startOrResumeThread(params: {

102105

rotatedContextEngineBinding = true;

103106

}

104107

}

108+

if (binding?.threadId && binding.userMcpServersFingerprint !== userMcpServersFingerprint) {

109+

embeddedAgentLog.debug("codex app-server user MCP config changed; starting a new thread", {

110+

threadId: binding.threadId,

111+

});

112+

await clearCodexAppServerBinding(params.params.sessionFile);

113+

binding = undefined;

114+

}

105115

if (binding?.threadId) {

106116

let pluginBindingStale = isCodexPluginThreadBindingStale({

107117

codexPluginsEnabled: params.pluginThreadConfig?.enabled ?? false,

@@ -198,6 +208,7 @@ export async function startOrResumeThread(params: {

198208

model: params.params.modelId,

199209

modelProvider: response.modelProvider ?? fallbackModelProvider,

200210

dynamicToolsFingerprint,

211+

userMcpServersFingerprint,

201212

pluginAppsFingerprint: binding.pluginAppsFingerprint,

202213

pluginAppsInputFingerprint: binding.pluginAppsInputFingerprint,

203214

pluginAppPolicyContext: binding.pluginAppPolicyContext,

@@ -218,6 +229,7 @@ export async function startOrResumeThread(params: {

218229

model: params.params.modelId,

219230

modelProvider: response.modelProvider ?? fallbackModelProvider,

220231

dynamicToolsFingerprint,

232+

userMcpServersFingerprint,

221233

pluginAppsFingerprint: binding.pluginAppsFingerprint,

222234

pluginAppsInputFingerprint: binding.pluginAppsInputFingerprint,

223235

pluginAppPolicyContext: binding.pluginAppPolicyContext,

@@ -239,7 +251,11 @@ export async function startOrResumeThread(params: {

239251

const pluginThreadConfig = params.pluginThreadConfig?.enabled

240252

? (prebuiltPluginThreadConfig ?? (await params.pluginThreadConfig.build()))

241253

: undefined;

242-

const config = mergeCodexThreadConfigs(params.config, pluginThreadConfig?.configPatch);

254+

const config = mergeCodexThreadConfigs(

255+

params.config,

256+

userMcpServersConfigPatch,

257+

pluginThreadConfig?.configPatch,

258+

);

243259

const response = assertCodexThreadStartResponse(

244260

await params.client.request(

245261

"thread/start",

@@ -270,6 +286,7 @@ export async function startOrResumeThread(params: {

270286

model: response.model ?? params.params.modelId,

271287

modelProvider: response.modelProvider ?? modelProvider,

272288

dynamicToolsFingerprint,

289+

userMcpServersFingerprint,

273290

pluginAppsFingerprint: pluginThreadConfig?.fingerprint,

274291

pluginAppsInputFingerprint: pluginThreadConfig?.inputFingerprint,

275292

pluginAppPolicyContext: pluginThreadConfig?.policyContext,

@@ -292,6 +309,7 @@ export async function startOrResumeThread(params: {

292309

model: response.model ?? params.params.modelId,

293310

modelProvider: response.modelProvider ?? modelProvider,

294311

dynamicToolsFingerprint,

312+

userMcpServersFingerprint,

295313

pluginAppsFingerprint: pluginThreadConfig?.fingerprint,

296314

pluginAppsInputFingerprint: pluginThreadConfig?.inputFingerprint,

297315

pluginAppPolicyContext: pluginThreadConfig?.policyContext,

@@ -530,6 +548,12 @@ function fingerprintDynamicTools(dynamicTools: CodexDynamicToolSpec[]): string {

530548

);

531549

}

532550551+

function fingerprintUserMcpServersConfigPatch(

552+

configPatch: JsonObject | undefined,

553+

): string | undefined {

554+

return configPatch ? JSON.stringify(stabilizeJsonValue(configPatch)) : undefined;

555+

}

556+533557

function fingerprintDynamicToolSpec(tool: JsonValue): JsonValue {

534558

if (!isJsonObject(tool)) {

535559

return stabilizeJsonValue(tool);