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

推荐订阅源

aimingoo的专栏
aimingoo的专栏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Blog — PlanetScale
Blog — PlanetScale
博客园 - Franky
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
I
InfoQ
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tailwind CSS Blog
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
D
Docker
Google DeepMind News
Google DeepMind News
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Proofpoint News Feed
N
Netflix TechBlog - Medium
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Engineering at Meta
Engineering at Meta
H
Help Net Security
B
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): avoid native compaction on budget triggers (#...
Steady-ai · 2026-05-27 · via Recent Commits to openclaw:main

@@ -54,6 +54,7 @@ function startCompaction(sessionFile: string, options: { currentTokenCount?: num

5454

sessionKey: "agent:main:session-1",

5555

sessionFile,

5656

workspaceDir: tempDir,

57+

trigger: "manual",

5758

...options,

5859

});

5960

}

@@ -64,6 +65,7 @@ function startSandboxedCompaction(sessionFile: string) {

6465

sessionKey: "agent:main:session-1",

6566

sessionFile,

6667

workspaceDir: tempDir,

68+

trigger: "manual",

6769

config: { agents: { defaults: { sandbox: { mode: "all" } } } },

6870

});

6971

}

@@ -74,6 +76,7 @@ function startNodeExecCompaction(sessionFile: string) {

7476

sessionKey: "agent:main:session-1",

7577

sessionFile,

7678

workspaceDir: tempDir,

79+

trigger: "manual",

7780

config: { tools: { exec: { host: "node", node: "worker-1" } } },

7881

});

7982

}

@@ -123,6 +126,63 @@ describe("maybeCompactCodexAppServerSession", () => {

123126

expect(details.pending).toBe(true);

124127

});

125128129+

it("skips native app-server compaction for automatic budget triggers", async () => {

130+

const fake = createFakeCodexClient();

131+

setCodexAppServerClientFactoryForTest(async () => fake.client);

132+

const sessionFile = await writeTestBinding();

133+134+

const result = requireCompactResult(

135+

await maybeCompactCodexAppServerSession({

136+

sessionId: "session-1",

137+

sessionKey: "agent:main:session-1",

138+

sessionFile,

139+

workspaceDir: tempDir,

140+

trigger: "budget",

141+

currentTokenCount: 456,

142+

}),

143+

);

144+145+

expect(fake.request).not.toHaveBeenCalled();

146+

expect(result.ok).toBe(true);

147+

expect(result.compacted).toBe(false);

148+

expect(result.reason).toBe("codex app-server owns automatic compaction");

149+

expect(result.result?.tokensBefore).toBe(456);

150+

expect(compactDetails(result)).toMatchObject({

151+

backend: "codex-app-server",

152+

skipped: true,

153+

reason: "non_manual_trigger",

154+

trigger: "budget",

155+

});

156+

});

157+158+

it("skips native app-server compaction when trigger is omitted", async () => {

159+

const fake = createFakeCodexClient();

160+

setCodexAppServerClientFactoryForTest(async () => fake.client);

161+

const sessionFile = await writeTestBinding();

162+163+

const result = requireCompactResult(

164+

await maybeCompactCodexAppServerSession({

165+

sessionId: "session-1",

166+

sessionKey: "agent:main:session-1",

167+

sessionFile,

168+

workspaceDir: tempDir,

169+

currentTokenCount: 789,

170+

}),

171+

);

172+173+

expect(fake.request).not.toHaveBeenCalled();

174+

expect(result.ok).toBe(true);

175+

expect(result.compacted).toBe(false);

176+

expect(result.reason).toBe("codex app-server owns automatic compaction");

177+

expect(result.result?.tokensBefore).toBe(789);

178+

expect(compactDetails(result)).toMatchObject({

179+

backend: "codex-app-server",

180+

skipped: true,

181+

reason: "non_manual_trigger",

182+

trigger: "unknown",

183+

});

184+

});

185+126186

it("blocks native app-server compaction when the current OpenClaw session is sandboxed", async () => {

127187

const fake = createFakeCodexClient();

128188

setCodexAppServerClientFactoryForTest(async () => fake.client);

@@ -278,6 +338,7 @@ describe("maybeCompactCodexAppServerSession", () => {

278338

sessionKey: "agent:main:session-1",

279339

sessionFile,

280340

workspaceDir: tempDir,

341+

trigger: "manual",

281342

config: {

282343

agents: {

283344

defaults: {

@@ -313,6 +374,7 @@ describe("maybeCompactCodexAppServerSession", () => {

313374

sessionKey: "agent:sara:session-1",

314375

sessionFile,

315376

workspaceDir: tempDir,

377+

trigger: "manual",

316378

config: {

317379

agents: {

318380

list: [

@@ -354,6 +416,7 @@ describe("maybeCompactCodexAppServerSession", () => {

354416

sessionKey: "agent:nik:session-1",

355417

sessionFile,

356418

workspaceDir: tempDir,

419+

trigger: "manual",

357420

config: {

358421

agents: {

359422

defaults: {

@@ -402,6 +465,7 @@ describe("maybeCompactCodexAppServerSession", () => {

402465

sessionKey: "agent:lossless:session-1",

403466

sessionFile,

404467

workspaceDir: tempDir,

468+

trigger: "manual",

405469

contextEngine,

406470

config: {

407471

plugins: {

@@ -455,6 +519,7 @@ describe("maybeCompactCodexAppServerSession", () => {

455519

sessionKey: "agent:lossless-child:session-1",

456520

sessionFile,

457521

workspaceDir: tempDir,

522+

trigger: "manual",

458523

contextEngine,

459524

config: {

460525

plugins: {

@@ -511,6 +576,7 @@ describe("maybeCompactCodexAppServerSession", () => {

511576

sessionKey: "agent:main:session-1",

512577

sessionFile,

513578

workspaceDir: tempDir,

579+

trigger: "manual",

514580

authProfileId: "openai-codex:runtime",

515581

});

516582