Skip to content

fix(codex): restore installed skills with catalog-backed models - #138944

Closed
Colton-Harris wants to merge 4 commits into
openclaw:mainfrom
opspot-ai:fix/codex-skill-carrier
Closed

Colton-Harris wants to merge 4 commits into
openclaw:mainfrom
opspot-ai:fix/codex-skill-carrier

Conversation

@Colton-Harris

@Colton-Harris Colton-Harris commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Related: #95058 (Codex/OpenClaw skill prompt-contract differences).

What Problem This Solves

An ordinary Codex-backed OpenClaw agent could not use installed skills when the active model supplies its own collaboration-mode instructions. The OpenClaw skill snapshot and the system-prompt report could both show the complete catalog while the model received none of it.

Why This Change Was Made

Codex intentionally prefers model_messages.collaboration_modes over caller-supplied collaborationMode.settings.developer_instructions (openai/codex#36351). OpenClaw was using that replaceable field to transport its skill catalog, so a catalog-backed model silently replaced it.

The eligible skill catalog now travels with the ordinary thread developer instructions, after the generic policy. Model-owned collaboration policy is preserved, and the catalog is no longer replaceable.

Skill catalog lifetime (revised after review)

The first revision folded the catalog into the generic policy string. That made an ordinary skill edit look like a generic-policy change, and a live incognito thread would refuse the next turn with CodexIncognitoPolicyChangeError. That was a real regression and it is fixed.

The catalog is now a separate lifecycle input (skillsInstructions), joined onto the wire developer carrier at request build rather than mixed into the policy:

  • Incognito / ephemeral threads — the retained record keeps the immutable generic policy and the catalog last delivered separately. Warm reuse compares only the generic policy, so the guard is unchanged and still fail-closed. A changed catalog is delivered to the live thread with thread/inject_items, and an unchanged catalog is not re-sent. Editing a skill no longer ends an incognito conversation; changing generic policy still refuses the turn.
  • Persistent threads — the catalog rides the thread developer carrier, so it participates in the thread-config fingerprint. A changed catalog invalidates warm reuse and cold-resumes the same thread with the new catalog through the existing policy handoff. The conversation is preserved.

Codex protocol behaviour was checked directly in a sibling openai/codex checkout: core/src/context/world_state/collaboration_mode.rs:30-42 (catalog messages replace caller collaboration instructions), app-server-protocol v2 thread.rs (thread/settings/update carries no developerInstructions), turn_processor.rs (thread_inject_items), and context-fragments/src/additional_context.rs (the 1,000-token cap rules out additionalContext as the catalog carrier).

User Impact

Ordinary root conversations receive the eligible OpenClaw skill catalog even with catalog-backed Codex models. No skill-file copying or configuration workaround is required. Editing a skill mid-session refreshes the catalog on both persistent and incognito conversations without ending either.

Native child inheritance — maintainer decision requested

Review asked whether native Codex children should inherit the parent's skill catalog, and recommended preserving root-local scope. One correction to the premise, then the actual question.

The thread developer carrier already flowed to native children before this PR. At the pre-PR base 1a727ee, extensions/codex/src/app-server/thread-requests.ts:215-216 already set developerInstructions in buildCodexThreadConfiguration, and codex-rs/core/src/tools/handlers/multi_agents_common.rs:205 copies that field into child configuration unconditionally:

config.developer_instructions = turn.developer_instructions.clone();

This repo's own docs already documented that as intended for the same carrier — docs/concepts/system-prompt.md:124: "OpenClaw adds the configured agent workspace's bounded AGENTS.md snapshot to the thread-level developer instructions so native Codex sub-agents inherit it." So this change does not newly expand the carrier's scope; it appends one section to a field children already inherited. Workspace persona, identity, and user profile stay on the turn-scoped collaboration carrier and still do not reach children.

The real question, for a maintainer: should the skill catalog specifically reach native children?

Root-local scope is implementable, and here is the exact shape, so the decision does not need another research round-trip. multi_agents_common.rs:206-213 honours features.multi_agent_v2.subagent_developer_instructions, which OpenClaw can set through the untyped config map on thread/start/thread/resume (the same channel native-skill-isolation.ts already uses for skills.include_instructions). It would be roughly five lines in buildCodexThreadConfiguration setting that key to the non-catalog half.

Two caveats that argue for deciding it deliberately rather than folding it into this repair:

  1. The override is gated on MultiAgentVersion::V2 (multi_agents_common.rs:206). Under V1 it is inert, so it would claim root-local scope while still inheriting on V1 paths.
  2. It is a whole-string replacement, so OpenClaw would have to duplicate the non-catalog half of its developer instructions and keep two copies in sync.

Happy to implement it in this PR or a follow-up — it is a product call about child capability, not a blocker I want to guess at.

Merge conflicts resolved

upstream/main (c9095375c0) is merged into this branch. Exactly one file conflicted, extensions/codex/src/app-server/run-attempt-turn-request.ts: upstream reshaped the buildTurnStartParams call (context images spread into runtime params, plus messageToolAvailable / requireExplicitMessageTarget) while this branch removed the skillsCollaborationInstructions option. The resolution keeps upstream's call shape and drops only that removed option; rg -n "skillsCollaborationInstructions" over the merged tree returns no hits.

The merge also surfaced a silent contract break worth calling out: upstream bcef3b3526d (#139657) changed closeAndWait() from Promise<boolean> to Promise<CodexAppServerCloseResult>, so the native skills test's .toBe(true) cleanup assertion failed. It now uses this repo's own convention for native tests (thread-lifecycle.native.test.ts:142, settled-turn-finalizer.native.test.ts:57): toMatchObject({ exited: true }). Still asserts a clean process exit.

Evidence

  • Merge: GitHub reports mergeable=MERGEABLE at head 164d85a4e5e (was CONFLICTING / DIRTY).
  • Two turns on the same incognito thread, the coverage review asked for: run-attempt.skills.test.ts drives three turns through the real runCodexAppServerAttempt and pins the exact request sequence thread/start, turn/start, thread/inject_items, turn/start, turn/start — turn 2 refreshes an edited catalog on the live thread with no new thread and no refusal; turn 3 repeats the catalog and sends nothing extra. It asserts thread/start had ephemeral: true, so this is a genuine incognito thread.
  • Reused persistent thread: new thread-lifecycle.binding.test.ts case asserts an edited catalog invalidates warm reuse and cold-resumes the same threadId with generic policy\n\n<new catalog> on thread/resume, plus the refreshed catalog in the thread/inject_items handoff.
  • The generic-policy guard is still fail-closed, verified by mutation rather than asserted: disabling the incognito check makes the parametrised policy case fail with promise resolved ... instead of rejecting, while the skills cases keep passing. Catalog refresh is permitted; policy drift is still refused.
  • Both new tests are non-vacuous, also verified by mutation: dropping options.skillsInstructions from the join in buildCodexThreadConfiguration fails both.
  • Tests: 648 passed across the seven directly relevant suites (639 at the previously reviewed head, before the new tests existed). A wider sweep over eight further related suites adds 98 passed. 746 related tests green, zero failures.
  • Typecheck: npx tsgo --noEmit -p tsconfig.json produces an error set identical to unmodified upstream/main (109 = 109, all pre-existing TS7016/TS7006 under scripts/). Zero new errors; zero in extensions/codex or src/skills.
  • Format/lint: oxfmt --check and oxlint clean over all 25 touched files. Both were first run against a deliberately broken probe file and both flagged it, so the clean result is a real pass rather than a silent no-op.
  • git diff --check: clean.

Live skill-read proof (addresses the "needs real behavior proof" block)

The prior loopback run was a fair criticism: synthetic provider, tools off, so it proved delivery but not selection. Here is an ordinary conversation on a real provider with tools enabled.

Setup: OpenClaw built from this branch, isolated state dir, real weather SKILL.md installed at workspace precedence tier 1, managed Codex app-server 0.153.4, model openai/gpt-5.6-sol over the OpenAI Platform Responses API. No gateway was started or modified.

The prompt, verbatim and complete — it names no skill, no skill system, and no path:

What's the weather in Charlotte tomorrow?

The model's first tool call, verbatim from the Codex rollout transcript:

const r = await tools.exec_command({cmd:"sed -n '1,240p' /tmp/openclaw-proof-138944/workspace/skills/weather/SKILL.md", ...})

immediately preceded by:

I'm using the weather skill to check tomorrow's Charlotte forecast.

That path is byte-identical to the <location> inside the <available_skills> block delivered in the thread developer instructions — the carrier this PR introduces:

  <skill>
    <name>weather</name>
    <description>Current weather and forecasts with web_fetch, falling back to wttr.in curl ...</description>
    <location>/tmp/openclaw-proof-138944/workspace/skills/weather/SKILL.md</location>
  </skill>
</available_skills>

Catalog delivered in the thread carrier → model selected weather from it → model read exactly that path → model followed the skill's own method (live wttr.in fetches) → answered. Five real tool calls, real network responses.

Meanwhile, in the same turn, turn_context.collaboration_mode.settings.developer_instructions was 1288 chars of Codex's own model-owned Default policy and contained no <available_skills> — which is precisely the PR's premise that this slot is model-owned and unsuitable as the catalog carrier.

One honest negative. A pre-fix contrast build (this branch with the two skill commits reverted) was run on the identical conversation, and it also delivered the catalog and read the skill. On gpt-5.6-sol over the API-key route, Codex 0.153.4 composed the caller's collaboration instructions with a shorter model-owned policy rather than replacing them, so the old carrier was not broken on that route. The catalog-drop reproduction therefore still rests on the packaged-binary native test and on Codex's documented precedence (collaboration_mode.rs:30-42), not on this live run. The live run proves the fixed behaviour end to end; it does not independently reproduce the original defect.

Change surface

Production +124/−34 (net +90), tests +487/−11, docs +23/−10, across 25 files. The earlier revision was a net −4 production change; the incognito lifecycle repair is why production grew — the catalog became a first-class lifecycle input with its own refresh path rather than a string concatenation.

Docs

docs/plugins/codex-harness-runtime.md contradicted codex-harness-reference.md about the skill carrier. Both now describe the thread carrier and the refresh semantics. Two further stale statements of the same claim were corrected in docs/concepts/system-prompt.md and docs/reference/token-use.md.

Remaining acceptance

The native-child scope question above is the one open item that needs a maintainer, not more evidence.

The same replaceable carrier is also used for persona/memory/cron overlays. Those are deliberately not moved in this skills-only repair; their root-local delivery contract is a separate follow-up.

AI-assisted contribution prepared by Rook, submitted at the operator's explicit request.

@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: codex size: M labels Sep 5, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 6, 2026, 3:46 PM ET / 19:46 UTC.

ClawSweeper review

What this changes

Moves installed-skill catalogs into Codex thread instructions and adds catalog refresh handling, regression tests, and documentation for persistent and incognito conversations.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 7 items remain

This remains a useful fix for a problem still present on main. The new live transcript demonstrates natural skill selection and loading, but the incognito compaction defect remains and the new regression suites lack full-suite registration.

Priority: P2
Reviewed head: 164d85a4e5eff70ebd960805833db45159bd7d59
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful native and live skill-use evidence supports the repair, but lifecycle correctness and test integration still limit readiness.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (logs): The captured real-provider transcript connects the changed thread carrier to an ordinary weather request, natural skill selection, and reading the exact catalog path through the branch build and native Codex runtime. This satisfies initial skill-use proof; the source-proven compaction defect remains a separate correctness blocker.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): The captured real-provider transcript connects the changed thread carrier to an ordinary weather request, natural skill selection, and reading the exact catalog path through the branch build and native Codex runtime. This satisfies initial skill-use proof; the source-proven compaction defect remains a separate correctness blocker.
Evidence reviewed 10 items Current-main necessity: At fetched main, buildTurnScopedCollaborationInstructions still includes skillsCollaborationInstructions, and thread configuration does not accept the separate skills catalog. No supplied merged PR fixes this behavior. Inspection of the latest release's source failed because its blob was unavailable; no release-fix claim is made.
Revised contributor proof: The captured body, SHA-256 2e5e37059203a50b82a146455f7447439a2317fafd2ceaf6d80889acc5729759, includes an isolated real-provider run through the branch build and Codex 0.153.4. An ordinary weather question led to selection of weather and a first tool call reading the exact catalog location. This satisfies the earlier natural-selection and skill-read request. The supplied body omits its final 2,110 UTF-16 units; GitHub API inspection failed and the browser returned an older body, which was not substituted for the captured evidence.
Affirmative dependency contract: The changed thread-configuration carrier explicitly depends on Codex's collaboration precedence. Direct inspection confirms catalog instructions take precedence over caller collaboration instructions. The sibling checkout is rust-v0.153.4 at this SHA; its origin resolves through a cache whose upstream is https://github.com/openai/codex.git.
Findings 2 actionable findings [P2] Preserve refreshed incognito catalogs through compaction
[P2] Register both new skill suites in the full-suite shard
Security None None.

How this fits together

The Codex plugin translates OpenClaw’s eligible skill catalog into instructions sent to the native Codex runtime. Those instructions tell the model which skills it can discover and load during a conversation.

flowchart TD
  A[Installed skills] --> B[Eligible skill catalog]
  B --> C[Codex thread instructions]
  C --> D[Persistent or incognito thread]
  D --> E[Catalog refresh]
  E --> F[Native context and compaction]
  F --> G[Model selects and reads skills]
Loading

Decision needed

Question Recommendation
Should native Codex children inherit the parent's eligible OpenClaw skill catalog? Accept catalog inheritance: Approve the existing native inheritance mechanism, with consistent current-catalog behavior and explicit documentation.

Why: The existing carrier already inherits, but adding the catalog changes child behavior; the contributor explicitly leaves this choice to maintainers.

Before merge

  • Preserve refreshed incognito catalogs through compaction (P2) - This prior finding remains on the unchanged head. Starting with catalog A and refreshing or withdrawing it injects only a history message; the native thread configuration still contains A. In Codex 0.153.4, default compaction discards that injected developer message and reconstructs instructions from the original configuration. Warm reuse then skips reinjection because the retained catalog already equals the requested value. Keep the current catalog authoritative across native context rebuilds and verify both edit and withdrawal without replacing the conversation.
  • Register both new skill suites in the full-suite shard (P2) - Both new run-attempt.skills*.test.ts files are excluded by the support shard's run-attempt*.test.ts pattern but absent from the explicit attempt-shard includes. Consequently they do not run in the normal full suite and violate the ownership assertion in test/vitest-projects-config.test.ts. Register both files in the appropriate attempt shard. This omission was visible at the prior reviewed head and was missed in that review.
  • Resolve merge risk (P1) - Native children will receive skill metadata they previously did not inherit; the contributor explicitly requests a maintainer decision on that scope.
  • Resolve merge risk (P1) - Incognito conversations can revert to an outdated catalog after native compaction, including resurrecting withdrawn entries.
  • Resolve merge risk (P1) - The final 2,110 units of the captured PR body could not be inspected; no negative proof conclusion is inferred from that omission.
  • Complete next step (P2) - Fix incognito catalog preservation through compaction, register both new test suites, and obtain a maintainer decision on native-child catalog inheritance.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

  • [P2] Preserve refreshed incognito catalogs through compaction — extensions/codex/src/app-server/thread-lifecycle-warm.ts:338-346
  • [P2] Register both new skill suites in the full-suite shard — extensions/codex/src/app-server/run-attempt.skills.test.ts:20-21
Agent review details

Security

None.

PR surface

Source +90, Tests +476, Docs +13. Total +579 across 25 files.

View PR surface stats
Area Files Added Removed Net
Source 15 124 34 +90
Tests 6 487 11 +476
Docs 4 23 10 +13
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 25 634 55 +579

Review metrics

Metric Value Why it matters
Production versus regression coverage production +90 net lines; tests +476 net lines Production growth separates immutable policy from refreshable catalogs; most added code exercises delivery and lifecycle behavior.
Full-suite registration 2 new suites lack an owner Focused test runs do not establish that these regressions run in the normal full suite.

Merge-risk options

Maintainer options:

  1. Preserve the current catalog through compaction (recommended)
    Repair the native context lifecycle and verify catalog edits and withdrawal on the same incognito thread before merging.
  2. Resolve child scope before landing
    Pause landing until the native-child catalog inheritance contract is explicitly accepted or narrowed.

Technical review

Best possible solution:

Keep one current catalog across native context rebuilds without ending incognito conversations, and document the maintainer-approved child-inheritance contract.

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

Yes, source establishes both the original collaboration-carrier loss and the remaining incognito defect: change or withdraw a catalog, compact the native thread, then continue with the same catalog snapshot. No contributor code was executed during this review.

Is this the best way to solve the issue?

Partly: thread instructions avoid model-catalog replacement, but a history-only refresh is not a durable replacement for canonical native context.

Full review comments:

  • [P2] Preserve refreshed incognito catalogs through compaction — extensions/codex/src/app-server/thread-lifecycle-warm.ts:338-346
    This prior finding remains on the unchanged head. Starting with catalog A and refreshing or withdrawing it injects only a history message; the native thread configuration still contains A. In Codex 0.153.4, default compaction discards that injected developer message and reconstructs instructions from the original configuration. Warm reuse then skips reinjection because the retained catalog already equals the requested value. Keep the current catalog authoritative across native context rebuilds and verify both edit and withdrawal without replacing the conversation.
    Confidence: 0.98
  • [P2] Register both new skill suites in the full-suite shard — extensions/codex/src/app-server/run-attempt.skills.test.ts:20-21
    Both new run-attempt.skills*.test.ts files are excluded by the support shard's run-attempt*.test.ts pattern but absent from the explicit attempt-shard includes. Consequently they do not run in the normal full suite and violate the ownership assertion in test/vitest-projects-config.test.ts. Register both files in the appropriate attempt shard. This omission was visible at the prior reviewed head and was missed in that review.
    Confidence: 0.99
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against a860f648b669.

Labels

Label justifications:

  • P2: This repairs installed-skill discovery for affected Codex models, with a bounded conversation-context impact.
  • merge-risk: 🚨 session-state: The injected incognito catalog can disappear during compaction while the adapter still considers it current.
  • merge-risk: 🚨 compatibility: Moving the catalog changes native-child instruction inheritance and requires an explicit scope decision.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (logs): The captured real-provider transcript connects the changed thread carrier to an ordinary weather request, natural skill selection, and reading the exact catalog path through the branch build and native Codex runtime. This satisfies initial skill-use proof; the source-proven compaction defect remains a separate correctness blocker.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured real-provider transcript connects the changed thread carrier to an ordinary weather request, natural skill selection, and reading the exact catalog path through the branch build and native Codex runtime. This satisfies initial skill-use proof; the source-proven compaction defect remains a separate correctness blocker.

Evidence

What I checked:

  • Current-main necessity: At fetched main, buildTurnScopedCollaborationInstructions still includes skillsCollaborationInstructions, and thread configuration does not accept the separate skills catalog. No supplied merged PR fixes this behavior. Inspection of the latest release's source failed because its blob was unavailable; no release-fix claim is made. (extensions/codex/src/app-server/turn-params.ts:226, a860f648b669)
  • Revised contributor proof: The captured body, SHA-256 2e5e37059203a50b82a146455f7447439a2317fafd2ceaf6d80889acc5729759, includes an isolated real-provider run through the branch build and Codex 0.153.4. An ordinary weather question led to selection of weather and a first tool call reading the exact catalog location. This satisfies the earlier natural-selection and skill-read request. The supplied body omits its final 2,110 UTF-16 units; GitHub API inspection failed and the browser returned an older body, which was not substituted for the captured evidence. (164d85a4e5ef)
  • Affirmative dependency contract: The changed thread-configuration carrier explicitly depends on Codex's collaboration precedence. Direct inspection confirms catalog instructions take precedence over caller collaboration instructions. The sibling checkout is rust-v0.153.4 at this SHA; its origin resolves through a cache whose upstream is https://github.com/openai/codex.git. (codex-rs/core/src/context/world_state/collaboration_mode.rs:36, 3d2ee51ca2d5)
  • Refresh updates history but suppresses subsequent delivery: The new incognito path injects a developer message when the catalog differs, then retains the delivered catalog value. Subsequent unchanged catalogs skip injection; the native thread's creation-time developerInstructions are not updated. (extensions/codex/src/app-server/thread-lifecycle-warm.ts:338, 164d85a4e5ef)
  • Compaction discards the refresh: Remote compaction V2 retains developer messages only through the optional client-authored retention path. That feature defaults to false. Native initial-context reconstruction reads turn_context.developer_instructions, so the original catalog returns while the injected replacement or withdrawal disappears. (codex-rs/core/src/compact_remote_v2.rs:499, 3d2ee51ca2d5)
  • Native child inheritance: build_agent_shared_config copies the parent's developer instructions. The subagent-specific replacement applies only to multi-agent V2. This supports the contributor's correction that the carrier already inherited, while appending the catalog changes which content children receive. (codex-rs/core/src/tools/handlers/multi_agents_common.rs:205, 3d2ee51ca2d5)

Likely related people:

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

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Repair catalog edit and withdrawal across native compaction while preserving the same incognito conversation.
  • Register both new suites and verify the full-suite ownership audit.
  • Record the maintainer's native-child catalog scope decision.

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 (3 earlier review cycles)
  • reviewed 2026-09-05T07:51:46.064Z sha eca4ea2 :: needs real behavior proof before merge. :: [P1] Preserve incognito turns when the skill catalog refreshes | [P3] Align the runtime guide with the selected skill carrier
  • reviewed 2026-09-06T18:15:44.933Z sha eca4ea2 :: needs real behavior proof before merge. :: [P1] [P1] Preserve incognito turns when the skill catalog refreshes | [P3] [P3] Align the runtime guide with the selected skill carrier
  • reviewed 2026-09-06T19:23:13.151Z sha 164d85a :: needs real behavior proof before merge. :: [P2] [P2] Preserve refreshed incognito catalogs through compaction

Moving the installed-skill catalog into thread developer instructions made
every catalog refresh look like a generic policy change. On a live incognito
thread the warm-reuse guard compared the whole creation string, so editing a
skill description and sending another message threw
CodexIncognitoPolicyChangeError before turn/start.

The catalog is now a separate lifecycle input (`skillsInstructions`). The
request builder joins it onto the wire developer carrier after the generic
policy, so catalog-backed models still receive it and persistent threads keep
cold-resuming through the existing policy handoff. The retained ephemeral
record splits the immutable generic policy from the catalog last delivered;
incognito warm reuse compares only the generic policy (unchanged guard, still
fail-closed) and delivers a changed catalog with a `thread/inject_items`
developer message, tracked so an unchanged catalog is not re-sent.

Docs: the runtime guide, system-prompt concept, and token-use reference still
said the catalog rode turn-scoped collaboration instructions; they now match
the thread carrier and the incognito refresh.

Codex protocol behavior checked in sibling ../codex (main 459a79e):
core/src/context/world_state/collaboration_mode.rs:30-42 (catalog messages
replace caller collaboration instructions), app-server-protocol v2 thread.rs
(thread/settings/update has no developerInstructions), turn_processor.rs
thread_inject_items, context-fragments/src/additional_context.rs (1,000-token
cap rules out additionalContext as the catalog carrier).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_0176wGf7ZCkA23SA13tChzt8
@Colton-Harris
Colton-Harris marked this pull request as ready for review September 6, 2026 18:10
Colton-Harris and others added 2 commits September 6, 2026 14:57
Resolves the reported merge conflict in
extensions/codex/src/app-server/run-attempt-turn-request.ts. Upstream
reshaped the buildTurnStartParams call (prompt context images spread into
the runtime params, plus messageToolAvailable and
requireExplicitMessageTarget); this branch removed the
skillsCollaborationInstructions turn carrier. The resolution keeps the
upstream call shape and drops only that removed option, which no longer
exists on CodexAttemptContext or the turn-params contract.

Co-Authored-By: Claude Opus 5 <[email protected]>
Adds the missing half of the reused-thread coverage. The incognito case
already proved an edited catalog reaches a live ephemeral thread through
thread/inject_items. This covers the persistent case: the catalog rides the
thread developer carrier, so it participates in the thread-config
fingerprint (thread-fingerprints.ts:121). An edited skill therefore
invalidates warm reuse and cold-resumes the SAME thread with the new
catalog, instead of either losing the conversation or answering from the
stale catalog.

Mutation-checked: dropping options.skillsInstructions from the join in
buildCodexThreadConfiguration fails both this test and the incognito
two-turn test, so neither assertion is vacuous.

Also adapts the native skills test to upstream's changed shutdown contract.
closeAndWait() returns CodexAppServerCloseResult rather than boolean since
bcef3b3 (openclaw#139657); the assertion now uses the same
toMatchObject({ exited: true }) form as the other native tests
(thread-lifecycle.native.test.ts:142, settled-turn-finalizer.native.test.ts:57).

Co-Authored-By: Claude Opus 5 <[email protected]>
@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. proof: sufficient ClawSweeper judged the real behavior proof convincing. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 6, 2026
@Colton-Harris

Copy link
Copy Markdown
Contributor Author

Recreated from my personal fork as #140422 (same commits, identical head SHA 164d85a). GitHub cannot grant maintainer push permission on an organization-owned fork, so the head had to move for the template's "Keep Allow edits from maintainers enabled" requirement. Closing this one in favor of #140422.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: codex merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant