Skip to content

fix(codex): preserve configured MCP tools in cron runs - #120078

Closed
joshavant wants to merge 6 commits into
mainfrom
fix/codex-configured-mcp-cron
Closed

joshavant wants to merge 6 commits into
mainfrom
fix/codex-configured-mcp-cron

Conversation

@joshavant

@joshavant joshavant commented Aug 7, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #113475

What problem this solves

Users running isolated Codex-backed automations could have a healthy globally configured MCP server, but the scheduled turn received none of its callable tools. The automation could therefore finish without doing its MCP-backed work even though openclaw mcp probe reported the server and tools as healthy.

This is the configured-MCP Phase A repair split from #119299. It does not add the Phase B scheduled-native app/connector authority model, provenance, descendant propagation, worker routing, or migration semantics discussed there.

Root cause and canonical owner

The Codex harness delegated OpenClaw-configured MCP ownership to Codex-native MCP configuration. That split transport, credential, discovery, policy, approval, invocation, persistence, and cleanup across two owners. A fresh senderless isolated cron turn could skip requester-scoped materialization, while an existing Codex thread could retain the retired native MCP configuration after OpenClaw moved to dynamic tools.

OpenClaw is now the sole owner of configured MCP execution:

  • OpenClaw resolves, starts, discovers, policy-filters, invokes, and cleans up configured MCP servers.
  • Codex receives only final filtered dynamic schemas and forwards calls to OpenClaw.
  • Configured tools materialize before the final exact tool-policy filter.
  • The first executable Codex tool build records only live, final-policy callable canonical tool identities for automation creator caps. Advertised-only stubs, app-only tools, registered-only tools, quarantined schemas, and protocol aliases are excluded.
  • Host-trusted before_tool_call policy runs before configured-MCP approval, so denial or parameter rewriting cannot be bypassed by opening approval first.
  • Requester-scoped MCP remains fail-closed without an authenticated requester.
  • Existing MCP approval modes are mirrored at the OpenClaw boundary, including the additive writes value on the existing mcp.codex.defaultToolsApprovalMode setting.
  • Runtime cleanup covers success, setup/start failure, cancellation, and compensation paths while MCP credentials stay outside model prompts and Codex thread configuration.

Safe upgrade of existing Codex threads

Threads created by a shipped version may still contain the retired Codex-native configured-MCP binding. Reusing those threads in place would preserve stale authority, while deleting them would erase valid user history. This PR therefore performs a one-time crash-recoverable replacement:

  • A normal Codex turn creates a dynamic-tool successor and durably records the predecessor-retirement transition.
  • The successor is committed only through exact expected-ID mutations under a global binding fence and per-binding lease.
  • Ordinary user-home predecessors keep their history but are durably tombstoned. OpenClaw refuses to resume, fork, unarchive, bind, steer, compact, review, or otherwise re-enter them or their descendants.
  • OpenClaw-owned supervised predecessors may be archived only after exact owner, status, and descendant checks.
  • Delete cleanup verifies both active and archived descendants before invoking Codex thread/delete.
  • Ambiguous, cyclic, conflicting, or excessive-depth lineage fails closed with an actionable normal-turn/Doctor recovery message.
  • Startup, terminal hooks, restarts, attach/transfer, catalog adoption, upstream/native forks, supervision, goals, review, compact, and steer paths preserve the retirement invariant.
  • Deferred callbacks cannot inherit an expired mutation-fence context; they reacquire ownership normally.

This is fail-forward rather than rollback-to-stale-authority behavior: after a durable tombstone exists, the old native-MCP thread can never silently become executable again.

User impact and compatibility

New isolated Codex-backed automations can call healthy, allowed globally configured MCP tools. Finite caps remain finite, requester-scoped tools do not become senderless, and creator-default caps contain only tools actually executable at creation time.

Upgrade notes:

  • Existing native-MCP Codex threads rotate once on their next normal turn. Their conversation continues on the successor; ordinary predecessor history is retained but cannot be resumed directly.
  • Model-visible names change from Codex-native mcp__server__tool names to OpenClaw canonical server__tool names because Codex reserves mcp__ for native MCP.
  • Existing finite/default automation jobs are never auto-widened. Affected jobs require an authenticated operator to add exact tool names or recreate the job; --clear-tools remains an explicit unrestricted ceiling, not a migration command.
  • Codex-native persisted/Guardian approval decisions are not migrated to OpenClaw's approval owner. Interactive approval is one-shot; unattended tools that require approval need the existing explicit approve mode.
  • Senderless scheduled execution does not borrow requester-scoped human credentials.
  • Precise diagnostics that distinguish MCP auth, listing/discovery, materialization, and final filtering remain a named follow-up. This PR fixes the healthy-server omission without heuristic recovery or silent mutation of old jobs.

There is no new dependency, Gateway protocol surface, SQLite schema-version change, environment variable, or user-facing configuration key.

Direct Codex runtime contract verification

The pinned dependency is Codex CLI 0.146.1 (rust-v0.146.1, commit 79b4f03d35962b005b007a015113b38930711665). The implementation was checked directly against:

  • dynamic-tool validation and reserved mcp__ prefix: codex-rs/app-server/src/request_processors/thread_processor.rs:226-313
  • validation/install at thread start: codex-rs/app-server/src/request_processors/thread_processor.rs:1209-1244
  • dynamic-call forwarding: codex-rs/core/src/tools/handlers/dynamic.rs:85-148
  • dynamic-tool persistence: codex-rs/core/src/session/mod.rs:659-664
  • recursive delete behavior: codex-rs/app-server/src/request_processors/thread_delete.rs:39-61
  • recursive archive behavior: codex-rs/app-server/src/request_processors/thread_processor.rs:1433-1486
  • fork and resume config reconstruction: codex-rs/app-server/src/request_processors/thread_processor.rs:3380-3525 and 3959-4160
  • parent-thread lineage: codex-rs/app-server-protocol/src/protocol/v2/thread_data.rs:170-185
  • review/compact children: codex-rs/core/src/codex_delegate.rs:101-126
  • multi-agent child config cloning: codex-rs/core/src/tools/handlers/multi_agents_common.rs:176-205
  • goal and steer runtime effects: codex-rs/app-server/src/request_processors/thread_goal_processor.rs:122-214, codex-rs/ext/goal/src/runtime.rs:159-209, and codex-rs/app-server/src/request_processors/turn_processor.rs:920-966
  • legacy history locking limitations: codex-rs/protocol/src/protocol.rs:691-697, codex-rs/thread-store/src/store.rs:48-51, and codex-rs/thread-store/src/local/mod.rs:253-279

Evidence

Frozen merge base: ec023a433614bdca5567fac0f00ea86b92fc60a9

Exact HEAD: d658fb391206d1a96417f2d85821d2d3b0a422f6

  • $autoreview --mode local --stream-engine-output reviewed the 522,691-byte final hardening bundle in two complete passes. Both returned zero accepted/actionable P0 findings; combined correctness was 0.96. TruffleHog was clean.
  • Hermetic changed Codex matrix: 17 files and 1,080 tests passed with an empty CODEX_HOME.
  • Core policy/persistence matrix: 2 files and 6 tests passed.
  • The final changed gate passed formatting, generated SDK/API contracts, deprecation/plugin-boundary checks, dead-code scans, all four core/extension production/test typecheck lanes, lint, storage/schema guards, import-cycle checks, and security/policy ratchets. Blacksmith returned HTTP 429 before provisioning the final run, so repository policy's trusted-source local fallback was used. An earlier full Blacksmith lint run passed on Testbox tbx_01kzdjxfrrr8a3rtw6jrbkn0js (Actions 31158890667).
  • Exact-commit live fix proof: AWS Crabbox run_2c07be5a4141. The remote source matched the committed retirement-module hash, built with real Codex CLI 0.146.1, completed normal first and resumed turns, persisted cronCleanupProbe__cleanup_probe in the creator-default cap, force-ran the isolated job, and proved invocation with an out-of-band nonce. One live test passed in 256.9 seconds; the lease stopped.
  • Frozen-base regression reproduction: AWS Crabbox run_4ba61517036c. Production was the exact merge-base tree with only two current assertion-harness files overlaid. It reproduced the defect before force-run: toolsAllowIsDefault=true, but the default cap omitted cronCleanupProbe__cleanup_probe, emitting EXPECTED_BASELINE_REPRO=missing_creator_default_configured_mcp_authority. The lease stopped.

The live server is a deterministic fake stdio MCP fixture, not Todoist. It proves the generic ownership boundary without requiring a hosted OAuth credential.

Diff classification against the frozen branch base:

  • Production: +4,067/-1,545 (net +2,522)
  • Tests/live-test support: +7,574/-1,592 (net +5,982)
  • Docs/generated: +121/-41 (net +80)

The positive production delta is the concrete capability/security/upgrade owner boundary: OpenClaw-owned configured MCP runtime, persisted crash-safe retirement state, global mutation coordination, exact lineage validation, and complete lifecycle routing. The old parallel Codex-native configured-MCP fingerprint/runtime path is removed rather than retained as a fallback.

@joshavant
joshavant requested a review from a team as a code owner August 7, 2026 00:17
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime scripts Repository scripts docker Docker and sandbox tooling agents Agent runtime and tooling extensions: codex size: XL labels Aug 7, 2026
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Aug 7, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 7, 2026
@joshavant
joshavant force-pushed the fix/codex-configured-mcp-cron branch from c0b3ca3 to 49ec978 Compare August 7, 2026 01:09
@joshavant

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@joshavant

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 7, 2026
@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 7, 2026, 10:38 AM ET / 14:38 UTC.

ClawSweeper review

What this changes

Moves configured MCP tools in Codex-backed runs into OpenClaw’s dynamic tool bridge, captures callable tools in cron creator ceilings, and retires legacy native-MCP thread bindings.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 6 items remain

Keep open: current main still has the reported senderless finite-cap MCP omission, while this protected maintainer PR is the active candidate fix; one release-owned changelog entry and material upgrade/contract proof remain before merge.

Priority: P1
Reviewed head: d658fb391206d1a96417f2d85821d2d3b0a422f6
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The source-backed bug and linked live run are useful, but the remaining upgrade proof, dirty merge state, and unavailable dependency contract keep this below merge readiness.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 7 items Current-main root cause: The Codex attempt appends only requester-scoped MCP tools to its dynamic surface; static configured MCP cannot enter this bridge on a senderless cron run.
Senderless path is intentionally empty: The requester-scoped runtime returns undefined without a requester sender, while finite allowlists disable the native Codex surface; the adjacent test confirms native mcp_servers are omitted in that mode.
Sibling owner pattern: The embedded runner already materializes the generic session MCP runtime before final policy while keeping requester-scoped servers fail-closed when senderId is absent, supporting the proposed owner boundary.
Findings 1 actionable finding [P2] Remove the release-owned changelog entry
Security Needs attention Verify legacy MCP authority retirement: Current native thread configuration carries MCP bearer/header environment references; verify that every legacy resume, fork, bind, and control route rejects retired authority after the successor is committed.

How this fits together

Configured MCP servers feed Codex agent attempts and isolated cron turns. The harness must expose only policy-allowed tools, preserve cron authority, and invoke MCP through OpenClaw without leaking credentials or reviving stale thread authority.

flowchart TD
A[Configured MCP servers] --> B[Codex attempt setup]
B --> C[OpenClaw dynamic tool bridge]
C --> D[Final policy and approvals]
D --> E[Cron creator tool ceiling]
E --> F[Isolated scheduled turn]
D --> G[OpenClaw MCP invocation]
B --> H[Legacy thread retirement]
Loading

Decision needed

Question Recommendation
Should OpenClaw sponsor this Phase A ownership migration, including permanent retirement of legacy native-MCP Codex bindings, once the exact-head upgrade proof is supplied? Sponsor with upgrade proof: Remove the changelog entry, resolve the dirty merge state, and require a redacted legacy-thread-to-successor proof plus direct Codex contract inspection before merge.

Why: The repair changes where MCP credentials and approval decisions are enforced and makes old threads non-resumable; that is a lasting authorization and upgrade policy choice, not a mechanical test gap.

Before merge

  • Remove the release-owned changelog entry (P2) - CHANGELOG.md is release-generated in this repository; retaining this normal-PR entry makes a later release SHA contain more than release-generation work. Keep the release-note context in the PR body or squash message and remove this line. This is the still-unfixed P2 from the prior review at the same head.
  • Resolve security concern: Verify legacy MCP authority retirement - Current native thread configuration carries MCP bearer/header environment references; verify that every legacy resume, fork, bind, and control route rejects retired authority after the successor is committed.
  • Resolve merge risk (P1) - Existing Codex thread bindings contain native MCP authority and credential references; the submitted proof does not show a base-created legacy thread rotating to a successor and rejecting every stale re-entry path.
  • Resolve merge risk (P1) - The public MCP approval setting gains the writes value and changes enforcement owner, so fresh-install and upgrade behavior for prompt/writes unattended cron use needs exact-head proof.
  • Resolve merge risk (P1) - GitHub currently reports this PR as dirty, and the unavailable local PR/Codex sources prevent an independent exact-head dependency-contract review.

Findings

  • [P2] Remove the release-owned changelog entry — CHANGELOG.md:68
  • [medium] Verify legacy MCP authority retirement — extensions/codex/src/app-server/run-attempt-tool-setup.ts:153
Agent review details

Security

Needs attention: The patch moves MCP credentials and approvals across a security boundary, but the exact-head legacy-transition proof and direct Codex contract inspection were unavailable to this review.

Review metrics

Metric Value Why it matters
Production and test delta production +4,067/-1,545 (net +2,522); tests/live support +7,574/-1,592 (net +5,982) The stated growth spans MCP ownership, cron authority, and thread retirement, so the upgrade boundary needs proportionate exact-head proof.
MCP approval configuration 1 accepted value added: writes This extends an existing public approval-mode setting and changes unattended execution behavior before merge.

Stored data model

Persistent data-model change detected: migration/backfill/repair: CHANGELOG.md, migration/backfill/repair: docs/cli/cron.md, migration/backfill/repair: docs/plugins/codex-harness-runtime.md, migration/backfill/repair: extensions/codex/doctor-contract-api.test.ts, migration/backfill/repair: extensions/codex/harness.test.ts, migration/backfill/repair: extensions/codex/harness.ts, and 14 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #113475
Summary: This PR is an active candidate repair for the configured-MCP omission tracked by the canonical issue; the broader earlier PR overlaps but remains an unmerged alternative.

Members:

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

Merge-risk options

Maintainer options:

  1. Complete the safe migration proof (recommended)
    Remove the release-owned changelog entry, rebase to a clean merge, and demonstrate a legacy native-MCP thread becoming a successor that rejects stale resume and control paths.
  2. Accept the explicit upgrade boundary
    A maintainer may accept the one-time non-resumable legacy-thread behavior after reviewing its credential, approval, and recovery consequences.
  3. Pause the retirement scope
    Keep this PR out of the merge queue if the permanent legacy-binding tombstone policy is not yet approved.

Technical review

Best possible solution:

Land a rebased Phase A repair only after removing the release-owned changelog line and proving a legacy native-MCP thread transitions once to a safe dynamic-tool successor without reopening old authority.

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

Yes—current main is source-reproducible: finite allowlists disable native Codex MCP while the only dynamic bridge returns nothing without a requester sender.

Is this the best way to solve the issue?

Unclear: OpenClaw-owned generic MCP materialization matches the existing embedded-runner owner pattern, but the exact PR head and required Codex dependency contract were unavailable for an independent best-fix verdict.

Full review comments:

  • [P2] Remove the release-owned changelog entry — CHANGELOG.md:68
    CHANGELOG.md is release-generated in this repository; retaining this normal-PR entry makes a later release SHA contain more than release-generation work. Keep the release-note context in the PR body or squash message and remove this line. This is the still-unfixed P2 from the prior review at the same head.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P1: The source-proven defect can let an isolated scheduled automation complete without its configured MCP capability.
  • merge-risk: 🚨 compatibility: Existing Codex thread bindings and the public MCP approval setting change upgrade behavior.
  • merge-risk: 🚨 auth-provider: Configured MCP credentials and approval decisions move from native Codex configuration to OpenClaw-owned invocation.
  • merge-risk: 🚨 security-boundary: The PR changes the authority boundary that controls MCP tools, approvals, and retired thread re-entry.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

Security concerns:

  • [medium] Verify legacy MCP authority retirement — extensions/codex/src/app-server/run-attempt-tool-setup.ts:153
    Current native thread configuration carries MCP bearer/header environment references; verify that every legacy resume, fork, bind, and control route rejects retired authority after the successor is committed.
    Confidence: 0.93

What I checked:

Likely related people:

  • Vincent Koc: Current blame and adjacent history connect this author to the requester-only MCP bridge and Codex lifecycle path that produce the reported omission. (role: recent area contributor; confidence: medium; commits: 65d449d4c11f, 228478bffe88, d863dd5f5ecf; files: src/agents/agent-bundle-mcp-harness.ts, extensions/codex/src/app-server/run-attempt-tool-setup.ts, extensions/codex/src/app-server/thread-lifecycle-run.ts)

Rank-up moves

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

  • Remove the release-owned changelog entry.
  • Rebase or otherwise resolve the dirty merge result and request an exact-head review.
  • Attach redacted legacy-thread rotation evidence showing successor creation, tombstoning, and rejected stale re-entry.

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 (4 earlier review cycles)
  • reviewed 2026-08-07T03:38:49.533Z sha fe49870 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-07T03:46:39.089Z sha fe49870 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-07T09:39:33.112Z sha d658fb3 :: found issues before merge. :: [P2] Remove the release-owned changelog entry
  • reviewed 2026-08-07T11:55:07.895Z sha d658fb3 :: found issues before merge. :: [P2] Remove the release-owned changelog entry

@clawsweeper clawsweeper Bot removed the rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. label Aug 7, 2026
@clawsweeper clawsweeper Bot added the rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. label Aug 7, 2026
@joshavant

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@joshavant

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@joshavant

Copy link
Copy Markdown
Collaborator Author

Local exact-range ClawSweeper review completed against ec023a433614..d658fb391206.

Its single P1 recommends treating non-ThreadSpawn subagents with no parentThreadId as trusted lineage roots. I am not applying that recommendation:

  • Codex 0.146.1 sets parent_thread_id: Some(parent_session.thread_id) for every delegated subagent source in codex-rs/core/src/codex_delegate.rs:101-123, including review delegates; this is not a ThreadSpawn-only contract.
  • Review/compact/memory delegates clone parent configuration, so an older parentless stored subagent can have inherited the retired native-MCP authority.
  • Accepting that ambiguous row as a root would reopen the stale-authority path. The branch intentionally fails closed, tests current review ancestry via parentThreadId, and tests rejection of an older parentless review row.

The report's proof criticism is fair and remains disclosed: AWS Crabbox run_2c07be5a4141 proves the reported configured-MCP cron failure is fixed plus normal resume behavior, but it is not a two-version live legacy-thread rotation. The retirement state machine is covered by the focused integration matrix; a redacted base-created-thread → exact-head upgrade run would be the strongest remaining optional proof.

Hosted re-review was requested twice, but both ClawSweeper comment-router attempts failed before worker dispatch on GitHub App rate limiting.

@openclaw-barnacle openclaw-barnacle Bot closed this Aug 7, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Aug 7, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 7, 2026
@openclaw-barnacle openclaw-barnacle Bot closed this Aug 7, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Aug 7, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 7, 2026
@joshavant

Copy link
Copy Markdown
Collaborator Author

Superseded by #120366, the clean Phase A replacement for configured MCP scheduling and #113475. The replacement preserves ordinary Codex-native behavior, removes the global legacy-thread retirement design, and carries the reviewed focused, stdio, exact-head gate, and direct Codex contract proof.

Thank you to everyone who reviewed this work and supplied the context that helped refine the boundary.

@joshavant joshavant closed this Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docker Docker and sandbox tooling docs Improvements or additions to documentation extensions: codex extensions: qa-lab gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL 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.

Configured MCP tools disappear inside isolated agentTurn cron runs

2 participants