Repository navigation
fix: explain unavailable Codex sessions on paired devices - #168641
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
|
Codex review: needs maintainer review before merge. What this changesThis PR explains unavailable Codex sessions on paired devices and documents node-side recovery choices. Example: The New Session picker shows Laptop unavailable because it does not advertise codex.exec-server.stdio.v1.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it provides a useful, verified explanation improvement that current main lacks, with no actionable correctness or security findings. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Gateway combines runtime command requirements with node declarations, pairing approval, and command policy, then supplies availability explanations to device discovery and placement. flowchart LR
A[Selected model and harness] --> C[Gateway command authority]
B[Node declarations and approvals] --> C
C --> D[Environment discovery]
C --> E[Placement admission]
D --> F[Device picker explanation]
Technical reviewBest possible solution: Keep the clearer explanation in the existing command-authority owner and retain the documented recovery choices. Do we have a high-confidence way to reproduce the issue? Current-main source shows the older diagnostic, and inspected fixture-backed screenshots demonstrate its appearance in the device picker; no target code was run during this read-only review. Is this the best way to solve the issue? The focused string change uses the existing shared authority and preserves distinct remedies for missing capability, pending approval, and policy denial. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 26b31273295d. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +3, Tests +50, Docs +16. Total +69 across 4 files. Added test files: 1. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 10, 2026, 6:05 PM ET / 22:05 UTC (Revision 2). |
45de26c to
bb4428f
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…68641) ## What Problem This Solves Fixes: the New Session device picker explains a missing Codex harness as an opaque node-command failure when an OpenAI model cannot run on a paired laptop. ## User Impact The reason now explains the model/harness/device relationship first, then gives the node-side install, enable, restart, and approval steps. Users can also choose a model using the OpenClaw harness. It says **unavailable**, rather than incorrectly claiming every disabled or denied plugin is uninstalled. There is no automatic installation, silent harness substitution, or change to node/Gateway approval policy. ## Why This Change Was Made Codex is an official external plugin, not part of the stock npm node package. A source checkout can also contain the plugin without enabling it on the node. The existing node-local plugin loader already declares `codex.exec-server.stdio.v1` only when the plugin is present and enabled; the new integration coverage preserves missing, explicitly disabled, explicitly denied, and enabled cases. No second capability or availability owner is needed. The shared required-command authority owns the explanation used by both device discovery and placement. Pending pairing approval and Gateway policy denial keep their existing, distinct remedies. Provenance: - [openclaw#88451](openclaw#88451) introduced the unified OpenAI implicit Codex default (`d56b73b6126`); [openclaw#104685](openclaw#104685) moved effective-route policy into the provider (`e00b05b5f3c`). Both were located with `git log -S`. - [openclaw#127202](openclaw#127202) introduced the approved paired-device exec-server command (`a3a58230b7f`). - [`47375e78b00`](openclaw@47375e7) deliberately excluded Codex from the root npm package. This PR preserves that distribution decision. - Inspected upstream Codex `codex-rs/cli/src/exec_server_command.rs` at `c248f6d48b97eb4a2aa56147a0b11b7d763278b9`: stdio execution is native; remote registration/auth is a separate branch. OpenClaw's plugin owns the pinned binary; the ordinary node does not need a separate Codex login to advertise the command. No overlap with Pash/Sarah changes in the changed files. ## Evidence - Regression through the real `environments.list` handler: the new harness explanation assertion fails on `d1abe907cb7` with the old command-first message (1 failed / 5 passed), and passes after the fix. - Focused checks: 33 tests passed across the real node plugin-loader integration, node-command policy, and environment-command authority suites. The node integration loads the actual Codex plugin, not a replacement registration fixture. - Rebased cleanly onto `bf08a7bc8c4`, including main's repair for the earlier duplicate-import failure. Full CI is green on `bb4428fc20492b523f42d812987261c74d27c138`: 57 passed, 54 skipped, no failures or pending checks; [CI gate](https://github.com/openclaw/openclaw/actions/runs/38089723977/job/114324791021). - Before the rebase, formatting, focused lint, core typecheck, and all core-test typecheck groups passed. The broad local changed-file gate stopped at repository-wide dead-export findings outside this patch; final verification is the green rebased CI run. - Actual Control UI before/after captures with deterministic Gateway fixtures, inspected on macOS arm64. The device stays disabled in both images; the improvement is the truthful explanation and recovery choices. The after fixture obtains its message from the production authority function. These are visual reproduction captures, not a live-model execution claim. ### Before  ### After  ## Bounded cost No new imports, network calls, binary downloads, processes, polling, state, configuration, or protocol fields. The existing missing-command branch returns a different string. Production code: +4/-1 lines; tests: +50 lines; documentation: +16 lines. ## Merge danger Two-way door: reverting restores the old explanation. The blast radius is the explanation for an undeclared command owned by the Codex plugin; eligibility, explicit disable/deny decisions, runtime choice, and execution remain unchanged. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes: the New Session device picker explains a missing Codex harness as an opaque node-command failure when an OpenAI model cannot run on a paired laptop.
User Impact
The reason now explains the model/harness/device relationship first, then gives the node-side install, enable, restart, and approval steps. Users can also choose a model using the OpenClaw harness. It says unavailable, rather than incorrectly claiming every disabled or denied plugin is uninstalled.
There is no automatic installation, silent harness substitution, or change to node/Gateway approval policy.
Why This Change Was Made
Codex is an official external plugin, not part of the stock npm node package. A source checkout can also contain the plugin without enabling it on the node. The existing node-local plugin loader already declares
codex.exec-server.stdio.v1only when the plugin is present and enabled; the new integration coverage preserves missing, explicitly disabled, explicitly denied, and enabled cases. No second capability or availability owner is needed.The shared required-command authority owns the explanation used by both device discovery and placement. Pending pairing approval and Gateway policy denial keep their existing, distinct remedies.
Provenance:
4c33aaa86c1); #104685 moved effective-route policy into the provider (1b1cebfe421). Both were located withgit log -S.1353ce0995c).d111676bcbfdeliberately excluded Codex from the root npm package. This PR preserves that distribution decision.codex-rs/cli/src/exec_server_command.rsatc248f6d48b97eb4a2aa56147a0b11b7d763278b9: stdio execution is native; remote registration/auth is a separate branch. OpenClaw's plugin owns the pinned binary; the ordinary node does not need a separate Codex login to advertise the command.Evidence
environments.listhandler: the new harness explanation assertion fails one40606fdea9with the old command-first message (1 failed / 5 passed), and passes after the fix.f3af0db8fce, including main's repair for the earlier duplicate-import failure. Full CI is green onbb4428fc20492b523f42d812987261c74d27c138: 57 passed, 54 skipped, no failures or pending checks; CI gate.Before
After
Bounded cost
No new imports, network calls, binary downloads, processes, polling, state, configuration, or protocol fields. The existing missing-command branch returns a different string. Production code: +4/-1 lines; tests: +50 lines; documentation: +16 lines.
Merge danger
Two-way door: reverting restores the old explanation. The blast radius is the explanation for an undeclared command owned by the Codex plugin; eligibility, explicit disable/deny decisions, runtime choice, and execution remain unchanged.