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

推荐订阅源

WordPress大学
WordPress大学
Engineering at Meta
Engineering at Meta
D
DataBreaches.Net
月光博客
月光博客
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
U
Unit 42
腾讯CDC
爱范儿
爱范儿
J
Java Code Geeks
有赞技术团队
有赞技术团队
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
B
Blog
Stack Overflow Blog
Stack Overflow Blog
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
小众软件
小众软件
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
Microsoft Azure Blog
Microsoft Azure Blog
T
Tailwind CSS 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): skip stale bootstrap history without engine ·...
vincentkoc · 2026-06-01 · via Recent Commits to openclaw:main

@@ -446,11 +446,13 @@ export async function runCodexAppServerAttempt(

446446

const activeContextEngine = isActiveHarnessContextEngine(params.contextEngine)

447447

? params.contextEngine

448448

: undefined;

449+

const isInactiveThreadBootstrapBinding = (binding: CodexAppServerThreadBinding | undefined) =>

450+

!activeContextEngine && binding?.contextEngine?.projection?.mode === "thread_bootstrap";

449451

let startupBinding = await readCodexAppServerBinding(params.sessionFile);

450452

preDynamicStartupStages.mark("read-binding");

451453

const startupBindingAuthProfileId = startupBinding?.authProfileId;

452-

const initialStartupBindingHadInactiveContextEngine =

453-

!activeContextEngine && Boolean(startupBinding?.contextEngine);

454+

const initialStartupBindingHadInactiveThreadBootstrap =

455+

isInactiveThreadBootstrapBinding(startupBinding);

454456

startupBinding = await rotateOversizedCodexAppServerStartupBinding({

455457

binding: startupBinding,

456458

sessionFile: params.sessionFile,

@@ -459,8 +461,8 @@ export async function runCodexAppServerAttempt(

459461

config: params.config,

460462

contextEngineActive: Boolean(activeContextEngine),

461463

});

462-

const initialInactiveContextEngineBindingForcedFreshStart =

463-

initialStartupBindingHadInactiveContextEngine && !startupBinding?.threadId;

464+

const initialInactiveThreadBootstrapBindingForcedFreshStart =

465+

initialStartupBindingHadInactiveThreadBootstrap && !startupBinding?.threadId;

464466

preDynamicStartupStages.mark("rotate-binding");

465467

const startupAuthProfileCandidate =

466468

params.runtimePlan?.auth.forwardedAuthProfileId ??

@@ -688,8 +690,8 @@ export async function runCodexAppServerAttempt(

688690

let contextEngineProjection: CodexContextEngineThreadBootstrapProjection | undefined;

689691

let precomputedStaleBindingContinuityProjectionApplied = false;

690692

let staleBindingContinuityForcedFreshStart = false;

691-

let inactiveContextEngineBindingForcedFreshStart =

692-

initialInactiveContextEngineBindingForcedFreshStart;

693+

let inactiveThreadBootstrapBindingForcedFreshStart =

694+

initialInactiveThreadBootstrapBindingForcedFreshStart;

693695

const applyFreshThreadContinuityProjection = () => {

694696

const projection = projectContextEngineAssemblyForCodex({

695697

assembledMessages: historyMessages,

@@ -881,8 +883,8 @@ export async function runCodexAppServerAttempt(

881883

if (activeContextEngine || !binding?.threadId) {

882884

return false;

883885

}

884-

if (binding.contextEngine) {

885-

inactiveContextEngineBindingForcedFreshStart = true;

886+

if (isInactiveThreadBootstrapBinding(binding)) {

887+

inactiveThreadBootstrapBindingForcedFreshStart = true;

886888

return false;

887889

}

888890

const projected = applyResumeStaleBindingContinuityProjection(binding);

@@ -892,7 +894,6 @@ export async function runCodexAppServerAttempt(

892894

const applyNoContextEngineContinuityProjection = (

893895

action: "started" | "resumed",

894896

binding?: CodexAppServerThreadBinding,

895-

rotatedContextEngineBinding = false,

896897

) => {

897898

if (activeContextEngine || !historyMessages.some((message) => message.role === "user")) {

898899

return false;

@@ -903,12 +904,9 @@ export async function runCodexAppServerAttempt(

903904

if (action === "started" && staleBindingContinuityForcedFreshStart) {

904905

return true;

905906

}

906-

if (

907-

action === "started" &&

908-

(inactiveContextEngineBindingForcedFreshStart || rotatedContextEngineBinding)

909-

) {

910-

// A retired or changed context-engine binding already forced Codex onto a

911-

// clean native thread; without the engine active, mirrored history would

907+

if (action === "started" && inactiveThreadBootstrapBindingForcedFreshStart) {

908+

// A retired thread-bootstrap context engine already forced Codex onto a

909+

// clean native thread; without that engine active, mirrored history would

912910

// re-inject stale bootstrap context as a new user turn.

913911

return false;

914912

}

@@ -929,8 +927,7 @@ export async function runCodexAppServerAttempt(

929927

return;

930928

}

931929

const previousThreadId = startupBinding.threadId;

932-

const hadInactiveContextEngineBinding =

933-

!activeContextEngine && Boolean(startupBinding.contextEngine);

930+

const hadInactiveThreadBootstrapBinding = isInactiveThreadBootstrapBinding(startupBinding);

934931

const projectedTurnTokens = estimateCodexAppServerProjectedTurnTokens({

935932

prompt: codexTurnPromptText,

936933

developerInstructions: buildRenderedCodexDeveloperInstructions(),

@@ -947,10 +944,10 @@ export async function runCodexAppServerAttempt(

947944

if (startupBinding?.threadId) {

948945

return;

949946

}

950-

inactiveContextEngineBindingForcedFreshStart = hadInactiveContextEngineBinding;

947+

inactiveThreadBootstrapBindingForcedFreshStart = hadInactiveThreadBootstrapBinding;

951948

staleBindingContinuityForcedFreshStart =

952949

precomputedStaleBindingContinuityProjectionApplied &&

953-

!inactiveContextEngineBindingForcedFreshStart;

950+

!inactiveThreadBootstrapBindingForcedFreshStart;

954951

if (activeContextEngine) {

955952

contextEngineProjection = undefined;

956953

try {

@@ -1110,13 +1107,7 @@ export async function runCodexAppServerAttempt(

11101107

params.abortSignal?.removeEventListener("abort", abortFromUpstream);

11111108

throw error;

11121109

}

1113-

if (

1114-

applyNoContextEngineContinuityProjection(

1115-

thread.lifecycle.action,

1116-

thread,

1117-

thread.lifecycle.rotatedContextEngineBinding === true,

1118-

)

1119-

) {

1110+

if (applyNoContextEngineContinuityProjection(thread.lifecycle.action, thread)) {

11201111

await rebuildCodexTurnPromptTextFromCurrentProjection();

11211112

}

11221113

trajectoryRecorder?.recordEvent("session.started", {