Skip to content

fix(codex): prefer the callable OpenClaw question tool - #159678

Merged
steipete merged 1 commit into
mainfrom
codex/qa1018-native-question
Oct 24, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa1018-native-question

Conversation

@steipete

@steipete steipete commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes Codex-backed conversations choosing the native blocking question tool in Default mode even when OpenClaw's Ask User tool is callable. With native defaults, that tool rejects the question.

User Impact

Blocking questions use the callable OpenClaw tool by default. Explicit native-question opt-ins remain honored, restricted-tool policy still wins, and native async questions and MCP elicitations keep their existing behavior.

Why This Change Was Made

On main base eea1c93a1d1cbc80b8fcb698bcc9246a9cfaba48, extensions/codex/src/app-server/run-attempt-start.ts:112 forwards retained tool declarations without current executor availability. extensions/codex/src/app-server/thread-requests.ts:420 does not select the working question tool for ordinary native-capable turns. A retained declaration alone cannot establish that ask_user can execute.

Pass actual executor availability into the existing thread-configuration owner. Reuse its preflight configuration snapshot to preserve authored native settings, including the winning enabled raw layer when the native typed response omits this key. Start, resume, fork, and supervised Continue share this policy. Existing effective-configuration fingerprints handle refresh; no additional state or fingerprint owner is introduced.

Evidence

  • On the main base, the callable-default policy and supervised-question lifecycle regressions both fail because the native blocking tool is not disabled. Eight selected controls pass. The startup and native-config files were not run on base; no additional base result is claimed.
  • The first fixed full route passes all 89 tests across tool-policy and lifecycle suites, including both base failures and explicit native opt-in controls (527.12s runner duration, mostly cold transformation). The final lifecycle rerun passes all 75 tests after the test-guard correction (456.79s wall); the unchanged tool-policy suite retains its passing result. No sleeps, retries, or timeouts were added.
  • The remaining local startup/native-config route and a standalone startup retry stalled before assertions in idle IPC dispatch. Both task-owned wrappers were stopped and joined with no active compiler or retained child. These are local setup gaps, not passing tests; exact-head CI must cover the changed files.
  • Formatting, focused syntax lint, registry lint, line-cap, assertion-safety, and diff checks pass. Local type-aware extension lint never reached linting: Plugin SDK declaration preparation hit its built-in 300-second timeout and left no valid input manifest. No stale-artifact bypass was used; exact-head CI must provide type-aware proof.
  • Independent Codex reviews of the initial candidate and final corrected candidate are both scoped-clean, with no actionable P0–P2 findings. ClawSweeper Revision 11 reviews this exact head with no findings or before-merge items; its optional live-proof gap is recorded below.
  • Production delta: +78/-2 (net +76); tests: +241/-22 (net +219); documentation: +10. The raw-layer reader supports the actual native projection contract and replaces no authoritative configuration owner.
  • Exact-head PR CI is green: run 40079101240, head 48701f966b6f79e92791319914d4606856742b51. The watcher confirms older failing aggregate entries are superseded. This includes successful startup/native-config coverage and type-aware extension lint (165s CI job), covering the local setup gaps. Extension test jobs took 122–187s; the larger changed-test job took 278s.

No live runtime/model or channel replay was performed. This lane uses focused production-boundary regressions and PR CI for broad validation, as requested.

@clawsweeper

clawsweeper Bot commented Sep 27, 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: S labels Sep 27, 2026
@steipete
steipete marked this pull request as ready for review September 27, 2026 14:02
@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: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 27, 2026
@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Prefer callable OpenClaw Ask User over Codex’s blocking question tool while preserving explicit native opt-ins and restricted-tool policy.

Example: A Default-mode conversation with callable ask_user asks the user to choose Reporting or Billing.

  • Before: Codex can select request_user_input and reject the call as unavailable in Default mode.
  • After: The native blocking tool is disabled by default, leaving OpenClaw Ask User available for the question.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-supported, with useful regression coverage; current evidence remains harness-based and exact-head CI is unfinished.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; current evidence exercises configuration and lifecycle harnesses, while older live-proof reports do not establish this head’s behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A Codex conversation can choose a blocking question tool that rejects the question before the user sees it.
Reason: The failure is source-backed, the existing OpenClaw tool supplies the needed capability, and maintainer authorship establishes direction.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR addresses a current Codex question-tool failure, and source review found no actionable introduced defect.

Priority: P2
Reviewed head: 48701f966b6f79e92791319914d4606856742b51

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No current-head shipped-entry-point replay or latest-stable upgrade run is supplied; the body records base-red/head-green proof for the callable-default and supervised-question regressions.
Agent review details

How this fits together

The Codex plugin translates OpenClaw tool availability and native configuration into app-server start, resume, and fork requests; accepted questions then use the existing interactive delivery paths.

flowchart TD
  A[OpenClaw turn tools] --> C[Thread configuration owner]
  B[Native configuration snapshot] --> C
  C --> D[Codex app server]
  D --> E[OpenClaw Ask User]
  E --> F[User answer]
Loading

Technical review

Best possible solution:

Keep question selection in the existing thread-configuration owner, using actual executor availability and preserving authored native preferences.

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

Source establishes the failure: the native blocking tool defaults on, Default-mode support defaults off, and the handler rejects before OpenClaw receives the question; no runtime execution was performed during this review.

Is this the best way to solve the issue?

This is a focused repair: it selects the usable existing tool through one configuration owner, reuses the preflight snapshot and refresh fingerprint, and leaves native opt-ins and restricted policy intact.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Native questions and configuration preferences changes intended behavior with a stated reason (feat(codex): surface native questions and goals #109724: Expose accepted native questions through existing structured presentation and request-scoped answer delivery.)
  • Native configuration preservation keeps the original intent (3f0b58e: Preserve local native configuration and established policy across supervised continuation.)
  • Shared effective configuration snapshot keeps the original intent (82d2c99: Use canonical native configuration facts for tool-policy and scheduled-capability handling.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 82d2c99 adds extensions/codex/src/app-server/config-layer-policy.ts:25 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 82d2c992a25b; files: extensions/codex/src/app-server/config-layer-policy.ts)

PR surface

Source +76, Tests +219, Docs +10. Total +305 across 13 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 6 78 2 +76
Tests 6 241 22 +219
Docs 1 10 0 +10
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 13 329 24 +305

Review metrics

Metric Value Why it matters
Production versus test LOC Production +78/-2; tests and test registration +241/-22 The production growth supplies executor plumbing and native-origin resolution; the tests cover configuration precedence, unavailable executors, supervised continuation, and loaded-thread refresh.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • remove proof: sufficient: Current real behavior proof status is not_applicable, not sufficient.
  • remove rating: 🦞 diamond lobster: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove proof: 📸 screenshot: Current real behavior proof evidence kind is not_applicable.

Label justifications:

  • P2: A bounded question-tool contract failure can prevent structured questions, while ordinary conversational recovery remains possible.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

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

  • For stronger confidence, replay a Default-mode question in an existing conversation after upgrading from stable, checking both default selection and an authored native opt-in.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (10 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-28T10:15:01.313Z sha 884736e :: blocked before merge. :: none
  • reviewed 2026-09-28T10:42:08.219Z sha 884736e :: blocked before merge. :: [P1] [P1] Preserve native opt-ins from the actual Codex config response
  • reviewed 2026-09-28T10:48:03.790Z sha 884736e :: blocked before merge. :: [P1] Preserve native opt-ins from the actual Codex config response
  • reviewed 2026-09-28T12:13:38.970Z sha c70f2d9 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T12:36:29.607Z sha 63401b8 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T22:59:50.114Z sha f0165a4 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-29T00:01:24.853Z sha 4327616 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-29T00:17:37.233Z sha 4327616 :: needs maintainer review before merge. :: none

Reviewed October 24, 2026, 4:49 AM ET / 08:49 UTC (Revision 11).

@clawsweeper clawsweeper Bot added 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. 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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 28, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The requested existing-conversation live proof is now in the PR body, with inspected before/after screenshots. On the patched build, Ask User displayed the Unicode choices, accepted Reporting — 🦞, and produced the exact final answer after reload. The canonical transcript confirms one answered Ask User call, zero tool errors, and no native request_user_input attempt. Built4c96 and reviewed884 have identical production/dependency inputs; their only difference is the test inventory registration. Full CI36407747806 on884 is green. All three PR screenshots load at1280×720.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The authored native-question setting finding is repaired in c70f2d9. The configuration owner now resolves projected-out keys from the enabled raw layer identified by the same snapshot's winning origin and version. Actual managed Codex 0.155.1 default/true/false responses prove this shape, and the production resolver consumes all three correctly. Response-shaped regressions fail before the repair; all 190 lifecycle tests, complete selected static checks and fresh independent review pass. The PR body preserves the default-path live screenshots and clearly distinguishes their build from the new native contract proof. New-head hosted CI is pending.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added 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 28, 2026
@steipete
steipete disabled auto-merge September 28, 2026 12:24
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Current head 63401b8 incorporates latest main 8aec780, including the owning planner timeout fix from PR160408 for the exact failed census in CI36419673215. All14question-fix files remain byte-identical to reviewed c70f2d9; fresh managed review of the full delta against latest main is clean. The PR body records the original failure, upstream cause and measured proof, unchanged question contract/lifecycle proof, and pending current-head CI. The accepted auto-merge request was retired before this replacement.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Sep 29, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Oct 13, 2026
Select OpenClaw's executable ask_user for blocking questions unless native
questions were explicitly enabled. Keep retained declarations separate from
executor availability and apply the policy through shared thread configuration
for start, resume, fork, and supervised continuation.

Resolve authored native opt-ins from effective configuration origins and enabled
raw layers when the typed projection omits the setting. Preserve async questions,
restricted-tool precedence, and live-thread configuration refresh.
@steipete
steipete force-pushed the codex/qa1018-native-question branch from 4327616 to 48701f9 Compare October 24, 2026 08:42
@steipete steipete changed the title fix(codex): use the available OpenClaw question tool fix(codex): prefer the callable OpenClaw question tool Oct 24, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 24, 2026
@steipete
steipete merged commit 9e95206 into main Oct 24, 2026
150 of 152 checks passed
@steipete
steipete deleted the codex/qa1018-native-question branch October 24, 2026 13:28
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 25, 2026
Select OpenClaw's executable ask_user for blocking questions unless native
questions were explicitly enabled. Keep retained declarations separate from
executor availability and apply the policy through shared thread configuration
for start, resume, fork, and supervised continuation.

Resolve authored native opt-ins from effective configuration origins and enabled
raw layers when the typed projection omits the setting. Preserve async questions,
restricted-tool precedence, and live-thread configuration refresh.
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 P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M stale Marked as stale due to inactivity 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.

1 participant