Skip to content

fix(codex): stop using stale instructions after prompt-hook changes - #135577

Merged
steipete merged 2 commits into
mainfrom
steipete/gracious-yalow-90e029
Sep 1, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/gracious-yalow-90e029

Conversation

@steipete

@steipete steipete commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Closes #135338 — stale generic instructions after Codex prompt-hook replacement.

What Problem This Solves

Fixes an issue where users continuing an ordinary Codex conversation could retain stale OpenClaw generic instructions after a before_prompt_build hook replaced the system prompt or explicitly returned an empty string. Sending the new configuration on resume alone did not update the next model request's inherited instruction history.

Why This Change Was Made

The Codex plugin now establishes native configuration ownership before reusing the existing complete-policy injection carrier. Persistent resumes keep the native conversation, establish that the old configuration was unloaded, and append a complete superseding policy or explicit withdrawal; this also keeps configuration correct for compaction and native-child inheritance. Independent native/project/collaboration instructions and user authority remain separate.

The existing exact-generation live-thread owner now also holds ordinary incognito creation policy in memory, without adding idle expiry or persistence. Direct preflight refusals retain their identity through failover and reply presentation, rather than turning diagnostic text into provider auth, billing, or overload facts. Integration preserves main's single transient retry controller and subprocess diagnostic copying; no removed outer retry loop is restored.

User Impact

Unchanged, configuration-proven warm conversations retain their fast path. Changed or cold persistent resumes refresh the full generic policy, including an explicit empty withdrawal. Old policy text may remain in append-only history, but the later complete policy supersedes it.

The owner explicitly accepted guarded persistent refresh and changed-incognito refusal. When another lease/subscriber or failed unload prevents configuration proof, the turn refuses before inference and preserves the conversation. Ordinary cold refresh requires managed local non-proxy stdio; external sockets/proxies cannot provide this proof. Resolve contention and reconnect through managed local stdio. Supervised external connections keep their existing, narrower connection-lease contract.

A live incognito conversation cannot change its creation-time generic policy on stock Codex. A changed or emptied policy therefore refuses before inference; restore the original policy to continue the same conversation, or start a new incognito conversation for the new policy. This introduces no expiry or new store.

Unknown policy-write outcomes are not automatically replayed or rotated away. Default external diagnostic privacy, verbose detail limits, group silence, accepted-partial settlement, heartbeat visibility, and Control UI formatting remain under their existing owners. There are no new settings, schemas, dependencies, native patches, or operator-state changes.

Evidence

Native behavior and dependency contract

Stock @openai/codex 0.151.0 was verified against its official npm platform artifact (SHA-256 98491713ffb196061003ee148636e743997cc31d76144ba7c53462269896891d). The baseline used production OpenClaw hook/prompt/lifecycle composition, admitted host authority, real native stdio, and a credential-free loopback Responses endpoint—not a mocked resume acknowledgment.

All twelve baseline native turns completed, but the six second-turn replacement/empty-policy assertions failed. The repaired native implementation passed twelve scenarios, including warm/cold replacement and withdrawal, unchanged warm reuse, contention recovery, incognito original-policy same-thread recovery, and A → B → native warm compaction → unchanged B. Captures contain 28 native HTTP requests; all 15 clients and both servers closed, with no Authorization headers or auth files. The same twelve scenarios were rerun successfully on exact published head 6a8f0492d3f0bfab5830b72c1102ebe157731d3a / tree 112f6d7c0fd4aab1c68724161838c4b0a79d2218 on Linux in Testbox run 33565101656: 28 requests, all 15 clients and both servers closed, no Authorization headers. Linux used frozen-lockfile stock Codex 0.151.0, native SHA-256 9739cbc928b9c573be83256acd46668f5dd4f119d2d09e05246895ca2aaf0c9a. The temporary launcher retained identical probe logic and only relocated its source aliases to the isolated Linux checkout. These runs prove model-input composition, not external model inference or model compliance.

Exact stock source personally inspected at 78c290807ce710180111df227df3b7a4fe845452:

Integrated verification

The source-bound Linux Node 24.19.0 test phase passed 2,457 tests across 60 complete files, plus a separate 14-test startup-retry run, in Testbox run 33542677845. The later lint phase of that run correctly failed on the combined test-file size; five existing HTTP 402/422 cases were then table-driven without dropping inputs or assertions. Counts across these overlapping runs must not be summed.

The initial Linux run also exposed an obsolete startup fixture: it expected native resume overload while retaining a competing lease. The existing real-stdio test now proves both the no-write contention refusal and native overload after legitimate lease release, preserving the same client and binding.

Main's retry-controller consolidation remains intact. Two failing known-reply tests demonstrated that its message-based classification could turn preflight diagnostics into provider overload copy; the guarded known-reply entry fixes that without restoring outer retry loops. Main's protocol declaration-build repair was picked up by rebase, rather than patched around here; all 40 task files remained byte-identical during that rebase.

Fresh isolated Codex reviews covered the complete integrated candidate and the final pending delta: scoped-clean at P0/P1, no findings. Reviewers inspected code/evidence; execution results are recorded separately.

The post-consolidation owner suite passed 78 tests, and full pnpm build passed on exact commit 6a8f0492d3f0bfab5830b72c1102ebe157731d3a / tree 112f6d7c0fd4aab1c68724161838c4b0a79d2218 in Testbox run 33561972328. Full pnpm check stopped at the assertion-baseline comparison because the prepared checkout was shallow and could not resolve the branch fork; its fallback compared unchanged older-base files against newer main. The unchanged exact-head full pnpm build and pnpm check then passed with complete Git history and the verified original fork in Testbox run 33565101656, provider blacksmith-testbox, lease tbx_01m1fgfg900589ywy3reb8arpb; no baseline was edited or bypassed. Exact-head PR CI also completed successfully. The final exact-head stock-native rerun also passed on that lease. The local attempt stopped before startup because the interrupted dependency install left openai/index.js missing; it is not counted as passing proof. Both ClawSweeper Rank-up moves are addressed: exact-head native/Testbox proof above and explicit compatibility/LOC acceptance.

Exact integrated test command (60 complete files)
node scripts/run-vitest.mjs \
  src/agents/failover-error.test.ts \
  src/agents/model-fallback.test.ts \
  src/agents/model-fallback.terminal-boundary.test.ts \
  src/agents/model-fallback.probe.test.ts \
  src/agents/model-fallback-observation.test.ts \
  src/agents/harness/lifecycle.test.ts \
  src/agents/harness/prompt-compaction-hook-helpers.test.ts \
  src/agents/embedded-agent-runner/run.harness-auth-failover.test.ts \
  src/agents/embedded-agent-runner/run/failover-retry-controller.test.ts \
  src/agents/embedded-agent-runner/run/failover-policy.test.ts \
  src/agents/embedded-agent-runner/run/retry-budget.test.ts \
  src/agents/embedded-agent-runner/run/retry-limit.test.ts \
  src/agents/embedded-agent-runner/run/assistant-failover.test.ts \
  src/agents/failover/failover-classification.corpus.test.ts \
  src/auto-reply/reply/agent-runner-failure-reply.test.ts \
  src/auto-reply/reply/agent-runner-execution-conversation-failures.test.ts \
  src/auto-reply/reply/agent-runner-execution-provider-failures.test.ts \
  src/auto-reply/reply/agent-runner-execution-auth-failures.test.ts \
  src/auto-reply/reply/agent-runner-execution-terminal-failures.test.ts \
  src/auto-reply/reply/agent-runner-execution-context-failures.test.ts \
  extensions/codex/src/app-server/attempt-client-cleanup.test.ts \
  extensions/codex/src/app-server/attempt-startup-retry.test.ts \
  extensions/codex/src/app-server/attempt-startup.test.ts \
  extensions/codex/src/app-server/auth-profile-runtime-contract.test.ts \
  extensions/codex/src/app-server/client-runtime.test.ts \
  extensions/codex/src/app-server/client.test.ts \
  extensions/codex/src/app-server/compact.test.ts \
  extensions/codex/src/app-server/context-compaction-activity.test.ts \
  extensions/codex/src/app-server/run-attempt-client-prewarm.test.ts \
  extensions/codex/src/app-server/run-attempt-connection.test.ts \
  extensions/codex/src/app-server/run-attempt-lifecycle-controller.test.ts \
  extensions/codex/src/app-server/run-attempt-runtime.authority.test.ts \
  extensions/codex/src/app-server/run-attempt-state.test.ts \
  extensions/codex/src/app-server/run-attempt-thread-cleanup.test.ts \
  extensions/codex/src/app-server/run-attempt-tools.test.ts \
  extensions/codex/src/app-server/run-attempt.agent-end-context.test.ts \
  extensions/codex/src/app-server/run-attempt.channel-tool-progress.test.ts \
  extensions/codex/src/app-server/run-attempt.configured-mcp.test.ts \
  extensions/codex/src/app-server/run-attempt.context-engine.test.ts \
  extensions/codex/src/app-server/run-attempt.dynamic-tools.test.ts \
  extensions/codex/src/app-server/run-attempt.hooks.test.ts \
  extensions/codex/src/app-server/run-attempt.media-lifetime.test.ts \
  extensions/codex/src/app-server/run-attempt.native-hook-relay-retention.test.ts \
  extensions/codex/src/app-server/run-attempt.native-hook-relay.test.ts \
  extensions/codex/src/app-server/run-attempt.notification-burst.test.ts \
  extensions/codex/src/app-server/run-attempt.reasoning-effort.test.ts \
  extensions/codex/src/app-server/run-attempt.steering-media.test.ts \
  extensions/codex/src/app-server/run-attempt.steering.test.ts \
  extensions/codex/src/app-server/run-attempt.test.ts \
  extensions/codex/src/app-server/run-attempt.turn-watches.test.ts \
  extensions/codex/src/app-server/run-attempt.usage-limits.test.ts \
  extensions/codex/src/app-server/run-attempt.vision-tools.test.ts \
  extensions/codex/src/app-server/shared-client.test.ts \
  extensions/codex/src/app-server/startup-binding.test.ts \
  extensions/codex/src/app-server/thread-lifecycle.app-inventory.test.ts \
  extensions/codex/src/app-server/thread-lifecycle.binding.test.ts \
  extensions/codex/src/app-server/thread-lifecycle.configured-mcp-ownership.test.ts \
  extensions/codex/src/app-server/thread-lifecycle.test.ts \
  extensions/codex/src/app-server/thread-lifecycle.user-mcp-servers.test.ts \
  extensions/codex/src/app-server/transport-startup.test.ts

The final isolated worktree also runs the post-consolidation owner test and the full repository gates:

node scripts/run-vitest.mjs src/agents/failover-error.test.ts
pnpm build
pnpm check

Scope and tradeoffs

Production LOC: +348/−177, net +171. Tests/support: +2661/−1073, net +1588. Docs: +58. Growth implements accepted configuration proof, volatile incognito-policy continuity, exact warm-owner revalidation, and non-retriable/private failure handling. The ordinary bypass and separate incognito reuse branch were removed; existing policy, ownership, SDK-error, and presentation mechanisms remain canonical.

No full-repository test suite, external model inference, live remote-worker run, native-child live spawn, or stronger supervised external-process attestation is claimed. Local Mac verification encountered filesystem/module-loading stalls and an incomplete, explicitly cancelled dependency install; those are not presented as passing checks or a proven OS/package-manager defect. Linux validation uses fresh lockfile-derived dependencies and exact source identities.

Regression introduction is unknown; no last-known-good release has been established. Documentation: https://docs.openclaw.ai/plugins/codex-harness-runtime#hook-boundaries and https://docs.openclaw.ai/plugins/codex-harness-reference.

Preserve full replacement and explicit withdrawal across persistent resumes, and refuse changed incognito policy without discarding its live conversation. Keep policy preflight failures out of provider retries and normal private diagnostic disclosure. Refs #135338.
Keep direct preflight diagnostics out of provider error classification after the retry-controller integration. Preserve contention and native-overload coverage, and table-drive existing status cases without dropping assertions.

Related: #135338
@clawsweeper

clawsweeper Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete steipete self-assigned this Sep 1, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling extensions: codex size: XL maintainer Maintainer-authored PR labels Sep 1, 2026
@steipete
steipete marked this pull request as ready for review September 1, 2026 21:53
@steipete
steipete requested a review from a team as a code owner September 1, 2026 21:53
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 7:12 PM ET / 23:12 UTC.

ClawSweeper review

What this changes

The branch safely applies changed Codex session policy on resumed conversations and refuses unsafe retained-session reuse before inference.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The PR provides a coherent repair for stale Codex generic policy, with its new refusal path explicitly accepted in maintainer discussion.

Priority: P1
Reviewed head: 6a8f0492d3f0bfab5830b72c1102ebe157731d3a

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Strong native-boundary evidence and owner-level lifecycle handling address the stale-policy invariant without a concrete introduced defect found.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The member-authored PR supplies exact-head Testbox evidence across 12 stock-native retained-session scenarios and reports 28 captured native HTTP requests showing replacement or withdrawal reaches the model boundary; source review confirms the exercised lifecycle and native contract.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The member-authored PR supplies exact-head Testbox evidence across 12 stock-native retained-session scenarios and reports 28 captured native HTTP requests showing replacement or withdrawal reaches the model boundary; source review confirms the exercised lifecycle and native contract.
Evidence reviewed 6 items Pinned merge identity: The locally verified test merge has the pinned PR base as first parent and PR head as second parent, so review used the introduced PR delta.
Policy handoff lifecycle: The persistent-policy path retains a live subscription until cold resume confirms unloaded state, then injects current policy; failure paths retire or unsubscribe the client.
Changed-policy ordering test: The lifecycle test installs the observer before unsubscribe and waits for the unloaded observation before continuing changed-policy resume.
Findings None None.
Security None None.

How this fits together

The Codex plugin combines hook-provided generic instructions with a native Codex app-server conversation. It either confirms safe reuse and injects current policy, or rejects the turn before a model request.

flowchart LR
  A[Prompt hook policy] --> B[Codex session lifecycle]
  C[Retained native client] --> B
  B --> D{Policy changed?}
  D -->|No| E[Reuse session]
  D -->|Persistent and confirmed| F[Resume and inject policy]
  D -->|Unsafe or incognito| G[Preflight refusal]
  E --> H[Native model request]
  F --> H
Loading

Before merge

  • Resolve merge risk (P1) - Existing managed Codex sessions with changed generic policy can now refuse reuse rather than silently retaining stale instructions; maintainer discussion explicitly accepts this fail-closed behavior.
  • Complete next step (P2) - The active maintainer-owned PR contains the owner-level repair and sufficient native-boundary evidence; no separate repair job is appropriate.
Agent review details

Security

None.

PR surface

Source +171, Tests +1588, Docs +58. Total +1817 across 40 files.

View PR surface stats
Area Files Added Removed Net
Source 17 348 177 +171
Tests 21 2661 1073 +1588
Docs 2 58 0 +58
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 40 3067 1250 +1817

Review metrics

Metric Value Why it matters
Production versus test delta production/docs +453/-227; tests/support +2614/-1023 The repair adds owner-bound lifecycle handling and substantially expands retained-session transition coverage.
Files affected 40 files changed The change spans Codex lifecycle ownership and shared failure handling.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #135338
Summary: This PR is the active candidate repair for the stale generic-policy issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Merge with the accepted safe-resume boundary (recommended)
    Accept refusal of changed-policy managed or incognito reuse when native ownership cannot prove the replacement reaches the next model request.

Technical review

Best possible solution:

Merge with the recorded safe-resume boundary: reuse only sessions whose policy ownership is confirmed, otherwise require a safe new-session path.

Do we have a high-confidence way to reproduce the issue?

Yes—high-confidence source and native-contract evidence identifies why subscribed or active native sessions can retain prior configuration; supplied exact-head native evidence exercises the affected transitions.

Is this the best way to solve the issue?

Yes—the branch repairs policy at the lifecycle owner, confirms native ownership before injection, and refuses inference rather than silently preserving stale instructions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against d9d19fefb4bb.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The member-authored PR supplies exact-head Testbox evidence across 12 stock-native retained-session scenarios and reports 28 captured native HTTP requests showing replacement or withdrawal reaches the model boundary; source review confirms the exercised lifecycle and native contract.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P1: The PR repairs silent stale generic policy in ordinary Codex conversations.
  • merge-risk: 🚨 compatibility: Changed policy can deliberately refuse retained-session reuse that previously continued with stale native configuration.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The member-authored PR supplies exact-head Testbox evidence across 12 stock-native retained-session scenarios and reports 28 captured native HTTP requests showing replacement or withdrawal reaches the model boundary; source review confirms the exercised lifecycle and native contract.
  • proof: sufficient: Contributor real behavior proof is sufficient. The member-authored PR supplies exact-head Testbox evidence across 12 stock-native retained-session scenarios and reports 28 captured native HTTP requests showing replacement or withdrawal reaches the model boundary; source review confirms the exercised lifecycle and native contract.

Evidence

Acceptance criteria:

  • [P1] Review exact-head Testbox native-session evidence for replacement, withdrawal, persistent resume, and incognito refusal.
  • [P1] Run affected Codex lifecycle and shared preflight/failure suites before merge.

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-01T22:08:24.837Z sha 6a8f049 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-01T22:17:53.994Z sha 6a8f049 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 1, 2026
@steipete

steipete commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Maintainer compatibility decision

Recording the explicit owner decisions already made for this repair: accept guarded persistent refresh and changed-live-incognito refusal. An ordinary persistent turn must stop before inference when exclusive native configuration ownership or unload cannot be established; it must preserve the conversation rather than silently use stale instructions. A retained incognito conversation keeps its creation-time policy and existing lifetime. Changed or explicitly empty policy stops before inference; restoring the original policy continues the same native conversation. There is no new persistence, expiry, silent conversation rotation, setting, or native patch.

The +171 production LOC is accepted for these concrete owner-boundary obligations: prove ordinary native-process/configuration ownership, preserve creation policy on the existing volatile live-thread owner, revalidate exact warm claims across awaited work, and carry deliberate refusals through existing failover/privacy/settlement owners without auth rotation or retries. The implementation removes the ordinary resume bypass and separate incognito reuse path and reuses the existing full-policy carrier, generation claim, SDK preflight error, and reply formatting. Injection alone would leave compaction and child configuration stale; configuration alone does not replace inherited generic history in stock Codex. Neither is a sound net-neutral substitute.

This addresses the compatibility decision and LOC item in the ClawSweeper review. Exact-head PR CI is now green at 6a8f0492d3f0bfab5830b72c1102ebe157731d3a. The full-history exact-head Linux build/check and stock-native probes have now also passed in Testbox run 33565101656, provider blacksmith-testbox, lease tbx_01m1fgfg900589ywy3reb8arpb. The exact source tree was 112f6d7c0fd4aab1c68724161838c4b0a79d2218; the original fork was verified with complete history. No source/baseline changes were needed for that rerun.

Final observed proof

All twelve stock-native scenarios passed: warm/cold full replacement and empty withdrawal, unchanged warm/incognito continuation, contention refusal without writes and subsequent recovery, changed/empty incognito refusal with original-policy same-thread recovery, warm/cold compaction, and A → B → native warm compaction → unchanged B. The last case preserved one process/thread and showed B without stale A after compaction, with no extra resume/injection hiding stale configuration. Across the two probes: 28 native HTTP requests, zero Authorization headers, all 15 clients and both servers closed. Linux native binary: stock Codex 0.151.0 from frozen-lockfile installation, SHA-256 9739cbc928b9c573be83256acd46668f5dd4f119d2d09e05246895ca2aaf0c9a.

Commands run in the isolated exact-head checkout:

pnpm install --frozen-lockfile
pnpm build
pnpm check
node .claude/ordinary-instruction-proof/repro/launch.mjs composition-final.mts
node .claude/ordinary-instruction-proof/repro/launch.mjs composition-warm-policy-compact.mts

The temporary probes use real OpenClaw hook/admission/lifecycle composition and stock native stdio with synthetic loopback HTTP/SSE responses. Source aliases were relocated for Linux; probe assertions and production source were unchanged. This proves native model-input composition, not external model inference/compliance. The local Mac rerun was blocked before startup by the interrupted dependency install; it is not claimed as passing. The earlier shallow-history check failure was resolved by restoring history, not relaxing the ratchet.

Additional proof: 2,457 owner/sibling tests across 60 files, 78 final owner tests plus exact-head build, and clean isolated Codex full-candidate/final-delta autoreviews at P0/P1. Complete test commands and source-contract links remain in the PR body. No full-repository test suite, live remote-worker run, or native-child live spawn is claimed.

Both ClawSweeper Rank-up moves are addressed: explicit compatibility acceptance above and inspected exact-head native/Testbox proof. Native review artifacts are complete; proceeding through the required scripts/pr prepare/merge gates.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 1, 2026
@steipete
steipete merged commit 759e127 into main Sep 1, 2026
365 checks passed
@steipete
steipete deleted the steipete/gracious-yalow-90e029 branch September 1, 2026 23:19
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Sep 2, 2026
#135833)

Consolidate preflight, provider-facet, and fallback settlement without changing ordering, presentation, or post-compaction attribution. Remove unused synthetic lifecycle history and waiter state.

Maintainer-requested follow-up to #135577; no policy-text or incognito-contract changes.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 2, 2026
…penclaw#135577)

* fix(codex): refresh stale generic policy after prompt-hook replacement

Preserve full replacement and explicit withdrawal across persistent resumes, and refuse changed incognito policy without discarding its live conversation. Keep policy preflight failures out of provider retries and normal private diagnostic disclosure. Refs openclaw#135338.

* fix(agents): preserve preflight identity in known failure replies

Keep direct preflight diagnostics out of provider error classification after the retry-controller integration. Preserve contention and native-overload coverage, and table-drive existing status cases without dropping assertions.

Related: openclaw#135338
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 2, 2026
openclaw#135833)

Consolidate preflight, provider-facet, and fallback settlement without changing ordering, presentation, or post-compaction attribution. Remove unused synthetic lifecycle history and waiter state.

Maintainer-requested follow-up to openclaw#135577; no policy-text or incognito-contract changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: codex maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Codex sessions retain stale generic instructions after prompt-hook replacement

1 participant