Repository navigation
fix(compaction): drop context-engine fallback on codex ownership skip - #115666
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
July 29, 2026 06:17
…#114155) Co-authored-by: HOYALIM <[email protected]>
steipete
force-pushed
the
steipete/codex-skip-no-fallback-114155
branch
from
July 29, 2026 10:54
c357081 to
68e6a1c
Compare
Contributor
Author
|
Merged via squash.
|
vincentkoc
added a commit
to yetval/openclaw
that referenced
this pull request
Jul 29, 2026
* origin/main: (224 commits) fix(memory): preserve Windows session ownership (openclaw#115851) fix(compaction): drop context-engine fallback on codex ownership skip (openclaw#114155) (openclaw#115666) fix(msteams): ignore blank certificate settings (openclaw#109112) fix(usage): guard malformed DeepSeek payloads (openclaw#110785) docs(agents): reword imported review rules in repo voice docs(agents): add context-budget, tool-description, cache-invalidation, and review-premise rules docs(agents): mock-gateway proof satisfies gate without discouraging live proof docs(agents): add vitest in-flight edit rule and mock-gateway proof recipe docs(agents): restructure root AGENTS.md around product doctrine and deduped policy fix(codex): keep completed answers over audit gaps (openclaw#115849) test(cli): isolate unknown-command process validation (openclaw#115848) fix(memory-host-sdk): resolve stable execPath for worker fork to survive Homebrew Node upgrades (openclaw#99318) feat(ui): add composer capability menu (openclaw#115800) fix(synology-chat): stop fabricating send message ids (openclaw#110770) fix(feishu): reply to direct messages by chat id (openclaw#109637) fix(acp): attach error listener to spawned ACP agent process (openclaw#109529) fix(sessions): deliver agent announcements to direct message sessions (openclaw#115811) fix(nextcloud-talk): reject reactions for disabled or unconfigured accounts (openclaw#112675) refactor(ui): move Agent Defaults entry from the sidebar into the Agents page (openclaw#115836) feat(gateway): push session PR indicators to subscribed clients (openclaw#115643) ... # Conflicts: # src/agents/apply-patch.ts # src/agents/sandbox/fs-bridge-mutation-helper.ts
pull Bot
pushed a commit
to yann0001/openclaw
that referenced
this pull request
Jul 29, 2026
* origin/main: fix: CJK replies are silently dropped instead of recovered when the model skips message(action=send) (openclaw#115556) fix(gateway): stop managed crash loops for pending agent DB migrations (openclaw#115631) fix(plugins): validate constrained empty config schemas (openclaw#109569) fix(cli-runner): scope bundle-MCP cleanup to the run's session, not the process-wide loopback server (openclaw#110251) fix(feishu): log message content JSON parse failures instead of silently swallowing (openclaw#107947) docs(vision,agents): layer calibration, interface-on-demand, telemetry opt-in, whole-document guidance rules fix(memory): preserve Windows session ownership (openclaw#115851) fix(compaction): drop context-engine fallback on codex ownership skip (openclaw#114155) (openclaw#115666) fix(msteams): ignore blank certificate settings (openclaw#109112)
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 30, 2026
…openclaw#114155) (openclaw#115666) Co-authored-by: HOYALIM <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 30, 2026
* origin/main: fix: CJK replies are silently dropped instead of recovered when the model skips message(action=send) (openclaw#115556) fix(gateway): stop managed crash loops for pending agent DB migrations (openclaw#115631) fix(plugins): validate constrained empty config schemas (openclaw#109569) fix(cli-runner): scope bundle-MCP cleanup to the run's session, not the process-wide loopback server (openclaw#110251) fix(feishu): log message content JSON parse failures instead of silently swallowing (openclaw#107947) docs(vision,agents): layer calibration, interface-on-demand, telemetry opt-in, whole-document guidance rules fix(memory): preserve Windows session ownership (openclaw#115851) fix(compaction): drop context-engine fallback on codex ownership skip (openclaw#114155) (openclaw#115666) fix(msteams): ignore blank certificate settings (openclaw#109112)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Budget-triggered compaction for Codex OAuth sessions failed with
No API key found for provider "openai"after successful turns. The chain: post-turn CLI compaction asks the codex harness to compact; codex correctly declines with "codex app-server owns automatic compaction"; the unlocked branch of that intentional skip then setfallbackToContextEngine: true, and the context-engine pass requires a direct provider API key that OAuth-only sessions don't have — a non-benign failure that surfaced every turn.Closes #114155. Supersedes the approach in #114182 (closed), whose diagnosis by @HOYALIM identified this exact chain (Co-authored-by on the commit).
Why This Change Was Made
Post-#115284/#115514 the ownership contract is explicit: Codex owns native-thread token pressure (codex-rs runs inline auto-compaction during turns —
codex-rs/core/src/session/turn.rs:1016-1095); OpenClaw owns only the host-transcript byte fuse. The intentional ownership skip is therefore a terminal no-op, not a reason to compact by other means: the unlocked branch now returns{compacted: false}exactly like the locked branch already did (src/agents/command/cli-compaction.ts), with the skip logged. Net −10 lines; deletes the last branch that fought the ownership boundary.User Impact
Codex OAuth (ChatGPT-auth) sessions no longer error after successful turns when budget compaction fires; codex's own automatic compaction continues to manage the thread, and the host byte fuse (#115514) continues to bound the host transcript independently.
Evidence
node scripts/run-vitest.mjs src/agents/command/cli-compaction.test.ts— 23 passed; the fallback test is rewritten to assert the clean skip for both unlocked and model-selection-locked sessions (no context-engine call, no compaction-store record).fallbackToContextEngine: true→ non-benign "No API key found" throw atcli-compaction.ts:784-790); codex inline auto-compaction verified in sibling../codexsource.