Skip to content

LCO 1.7: Eva remote Codex control - #800

Merged
100yenadmin merged 5 commits into
mainfrom
feat/1.7-eva-remote-codex-control
Jul 30, 2026
Merged

LCO 1.7: Eva remote Codex control#800
100yenadmin merged 5 commits into
mainfrom
feat/1.7-eva-remote-codex-control

Conversation

@100yenadmin

@100yenadmin 100yenadmin commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • add an opt-in persistent Unix-socket WebSocket transport for the already-running Codex daemon while keeping stdio as the public default
  • add opaque current-target routing plus approval-bound idle send, active steer, and interrupt delivery
  • add Hermes tool registration, operator guidance, release notes, and regression coverage for the 1.7 control path

Runtime findings addressed

  • Codex's daemon endpoint rejects WebSocket compression negotiation, so the UDS client disables it explicitly
  • loaded-task ownership is connection-scoped, so daemon control and read operations share one persistent serialized connection
  • a new idle task is not materialized before its first user message, so routing reads metadata first and requests turn projection only for active tasks
  • idle delivery sends directly to the already-loaded task and returns accepted, allowing active re-resolution and steering

Validation

  • npm run check — 1,281 tests passed
  • npm pack --dry-run
  • isolated packed install reports 1.7.0
  • strict candidate CLI/MCP smoke passed
  • strict Hermes smoke and Hermes readiness passed
  • Hermes's installed Python MCP client initialized, registered all required tools, routed an opaque disposable daemon task, and delivered an approval-bound harmless message
  • disposable daemon canaries passed route, idle send, active re-resolution, steer, and interrupt acceptance
  • evidence privacy scan passed with no raw artifacts or secret-like findings

Boundaries

  • does not start or restart Codex
  • does not enable Codex Remote Control
  • does not claim ownership of Desktop tasks; those remain a Hermes Computer Use route
  • does not add generic GUI mutation, Claude control, watchers, embeddings, or retrieval expansion
  • does not include raw transcripts, message text, thread/turn identifiers, socket paths, credentials, or copied runtime configuration in shared evidence

Closes #787
Closes #797
Related to #798
Related to #799

Agent-authored under the user-approved LCO 1.7 delivery plan.

Summary by CodeRabbit

  • New Features

    • Added optional daemon transport for local Codex sessions.
    • Added Codex control routing and approval-gated delivery tools.
    • Added opaque target references for safer delivery and interruption workflows.
    • Added dry-run, audit, revalidation, and indeterminate-failure protections.
  • Documentation

    • Updated setup, workflow, safety, and release documentation for the new controls and transport options.
    • Added version 1.7.0 release notes.
  • Release

    • Bumped the package and plugin version to 1.7.0.

@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #800 - LCO 1.7: Eva remote Codex control
Head: 69e36e0aa749b68ab34eb878da382e13bad588f9
Updated: 2026-07-30T10:58:08.286Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #800

Review URL: #800 (review)

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 35 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b1e4d52e-efbe-42bb-b62b-cc7f5da7aaa8

📥 Commits

Reviewing files that changed from the base of the PR and between a6f9de3 and cc971ef.

📒 Files selected for processing (7)
  • packages/adapters/src/codex-jsonrpc.ts
  • packages/adapters/src/index.ts
  • packages/mcp-server/src/codex-control-router.ts
  • packages/mcp-server/src/tools.ts
  • tests/bridge-safety-core.test.ts
  • tests/codex-control-router.test.ts
  • tests/control-and-mcp.test.ts
📝 Walkthrough

Walkthrough

This release adds opt-in local Codex daemon transport over Unix sockets, opaque target routing with approval-gated delivery and interrupt support, expanded MCP tool contracts, audit lifecycle tracking, runtime configuration, validation coverage, and 1.7.0 release documentation.

Changes

Codex daemon transport

Layer / File(s) Summary
Persistent Unix-socket client
packages/adapters/src/codex-jsonrpc.ts, tests/bridge-safety-core.test.ts
Adds WebSocket-over-UDS transport, persistent queued requests, reconnect handling, daemon socket resolution, and integration coverage.
Runtime transport selection
packages/mcp-server/src/codex-runtime-transport.ts, packages/mcp-server/src/server-runtime.ts, tests/codex-runtime-transport.test.ts
Selects stdio or daemon mode from environment configuration and wires control/read clients into the MCP runtime.

Codex control flow

Layer / File(s) Summary
Approval and control lifecycle
packages/adapters/src/index.ts, tests/control-and-mcp.test.ts
Records dry-run, claimed, and completed approval states; rejects replayed approvals; validates transport capabilities; and classifies indeterminate and non-steerable responses.
Opaque target router
packages/mcp-server/src/codex-control-router.ts, tests/codex-control-router.test.ts
Routes daemon-loaded targets and supports TTL validation, active steering, idle delivery, interrupts, stale-target rejection, sanitized results, and blocked outcomes.

MCP and release surface

Layer / File(s) Summary
Tool contracts and exposure
packages/mcp-server/src/tools.ts, packages/mcp-server/src/policy.ts, openclaw.plugin.json, packages/openclaw-plugin/openclaw.plugin.json
Adds route/deliver tools and aliases, expands interrupt input forms, updates policies and exposure tiers, and refreshes tool coverage expectations.
Documentation and release metadata
README.md, docs/SETUP.md, docs/releases/*, docs/CLAIM_AUDIT.md, docs/HERMES_ADAPTER_BOUNDARY.md, package.json, .codex-plugin/plugin.json
Documents daemon-mode operation and safety boundaries, adds 1.7.0 release notes, updates package versions, and adds the WebSocket dependency.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Hermes
  participant MCPServer
  participant CodexControlRouter
  participant CodexDaemon
  Hermes->>MCPServer: lco_codex_control_route(hint)
  MCPServer->>CodexControlRouter: route(hint)
  CodexControlRouter->>CodexDaemon: read loaded threads
  CodexDaemon-->>CodexControlRouter: thread projections
  CodexControlRouter-->>Hermes: opaque target_ref
  Hermes->>MCPServer: lco_codex_deliver(target_ref, message, dry_run)
  MCPServer->>CodexControlRouter: deliver(target_ref, message)
  CodexControlRouter->>CodexDaemon: revalidate target and deliver or steer
  CodexDaemon-->>CodexControlRouter: control response
  CodexControlRouter-->>Hermes: delivery result
Loading

Possibly related issues

Possibly related PRs

Suggested labels: documentation, safety, orchestrator, codex, mcp

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Concise and relevant: it names the 1.7 Eva Codex control work, which matches the main transport/control changes.
Linked Issues check ✅ Passed The daemon UDS transport and active-turn route/deliver/interrupt flow, plus tests and safety constraints, align with #787 and #797.
Out of Scope Changes check ✅ Passed Changes are limited to transport, control routing, docs, tests, and versioning needed for the stated 1.7 control work.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/1.7-eva-remote-codex-control

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Comment @coderabbitai help to get the list of available commands.

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #800 - LCO 1.7: Eva remote Codex control
Head: 69e36e0aa749b68ab34eb878da382e13bad588f9 into main. Review event: COMMENT.
Provider: Unregistered provider id (builtin:zai-coding-plan, zcode (registry miss), model unknown).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
README.md modified +20/-2 Documentation Low
docs/BETA_RELEASE_RUNBOOK.md modified +1/-1 Documentation Low
docs/CLAIM_AUDIT.md modified +10/-4 Documentation Low
docs/HERMES_ADAPTER_BOUNDARY.md modified +17/-2 Documentation Low
docs/SETUP.md modified +33/-4 Documentation Low
docs/releases/CHANGELOG.md modified +2/-1 Documentation Low
docs/releases/RELEASE_NOTES_1.7.0.md added +53/-0 Documentation Low
package-lock.json modified +37/-2 Configuration Low
package.json modified +5/-1 Configuration Low
packages/adapters/src/codex-jsonrpc.ts modified +158/-22 Changed file Moderate: validated P3 finding
packages/adapters/src/index.ts modified +15/-8 Changed file Low
packages/adapters/src/policy.ts modified +2/-0 Changed file Low
packages/cli/src/hermes-smoke.ts modified +2/-0 Changed file Low
packages/mcp-server/src/codex-control-router.ts added +344/-0 Changed file Moderate: validated P2 finding
packages/mcp-server/src/codex-runtime-transport.ts added +73/-0 Changed file Moderate: validated P3 finding
packages/mcp-server/src/server-runtime.ts modified +6/-18 Changed file Low
packages/mcp-server/src/tools.ts modified +62/-8 Changed file Low
packages/openclaw-plugin/openclaw.plugin.json modified +187/-23 Changed file Elevated: large change
tests/bridge-safety-core.test.ts modified +89/-0 Test coverage Low
tests/codex-control-router.test.ts added +382/-0 Test coverage Elevated: large change
tests/codex-runtime-transport.test.ts added +45/-0 Test coverage Low
tests/control-and-mcp.test.ts modified +17/-1 Test coverage Low
tests/hermes-smoke.test.ts modified +1/-1 Test coverage Low
tests/openclaw-plugin-manifest.test.ts modified +1/-1 Test coverage Low
tests/qa-lab-tool-coverage.test.ts modified +7/-7 Test coverage Low

1 additional changed files omitted from this walkthrough.

Review Signal

Validated inline findings: 4 (P0: 0, P1: 0, P2: 1, P3: 3).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Proof gap: 1
  • Runtime correctness: 2
  • Security boundary: 1

Validation and Proof

2 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
  • required: CI/release smoke proof - CI, release, launchd, or package metadata changed. Proof: green GitHub check; release-status; coverage-audit; rollback note.
    Proof status: missing - 1 required validation/proof recommendation(s) missing from PR metadata.
    Profile validation hints: Call out evidence leakage, replay/collision risks, duplicate side effects, and brittle sanitizer logic.
    Profile proof expectations: Look for focused sanitizer, signature, orchestration, or fixture proof.

Related Context

Related issues/PRs: #787, #797, #798, #799.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Suggested labels (suggestion_only); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: orchestration, security, regression-hardening
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread packages/mcp-server/src/codex-control-router.ts
Comment thread packages/mcp-server/src/codex-control-router.ts
Comment thread packages/adapters/src/codex-jsonrpc.ts
Comment thread packages/mcp-server/src/codex-runtime-transport.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 69e36e0aa7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/mcp-server/src/tools.ts
Comment thread packages/mcp-server/src/server-runtime.ts
Comment thread packages/adapters/src/index.ts
Comment thread packages/mcp-server/src/codex-control-router.ts
Comment thread packages/mcp-server/src/codex-control-router.ts
Comment thread packages/adapters/src/codex-jsonrpc.ts
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #800 - LCO 1.7: Eva remote Codex control
Head: a6f9de3c775af041580217d945a30f446de3dd7e
Updated: 2026-07-30T11:09:14.549Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #800

Review URL: #800 (review)

@coderabbitai coderabbitai Bot added codex Codex session indexing or control documentation Improvements or additions to documentation mcp MCP server and tool surface orchestrator Orchestrator-agent workflow, context retention, and session management safety Safety, approval, privacy, or control-boundary issue labels Jul 30, 2026

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #800 - LCO 1.7: Eva remote Codex control
Head: a6f9de3c775af041580217d945a30f446de3dd7e into main. Review event: COMMENT.
Provider: Unregistered provider id (builtin:zai-coding-plan, zcode (registry miss), model unknown).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
README.md modified +20/-2 Documentation Low
docs/BETA_RELEASE_RUNBOOK.md modified +1/-1 Documentation Low
docs/CLAIM_AUDIT.md modified +10/-4 Documentation Low
docs/HERMES_ADAPTER_BOUNDARY.md modified +17/-2 Documentation Low
docs/SETUP.md modified +33/-4 Documentation Moderate: validated P3 finding
docs/releases/CHANGELOG.md modified +2/-1 Documentation Low
docs/releases/RELEASE_NOTES_1.7.0.md added +53/-0 Documentation Low
package-lock.json modified +37/-2 Configuration Low
package.json modified +5/-1 Configuration Low
packages/adapters/src/codex-jsonrpc.ts modified +158/-22 Changed file Moderate: validated P2 finding
packages/adapters/src/index.ts modified +92/-23 Changed file Elevated: validated P1 finding
packages/adapters/src/policy.ts modified +2/-0 Changed file Low
packages/cli/src/hermes-smoke.ts modified +2/-0 Changed file Low
packages/mcp-server/src/codex-control-router.ts added +367/-0 Changed file Moderate: validated P2 finding
packages/mcp-server/src/codex-runtime-transport.ts added +73/-0 Changed file Low
packages/mcp-server/src/server-runtime.ts modified +6/-18 Changed file Low
packages/mcp-server/src/tools.ts modified +62/-8 Changed file Low
packages/openclaw-plugin/openclaw.plugin.json modified +187/-23 Changed file Elevated: large change
tests/bridge-safety-core.test.ts modified +89/-0 Test coverage Low
tests/codex-control-router.test.ts added +442/-0 Test coverage Elevated: large change
tests/codex-runtime-transport.test.ts added +45/-0 Test coverage Low
tests/control-and-mcp.test.ts modified +38/-5 Test coverage Low
tests/hermes-smoke.test.ts modified +1/-1 Test coverage Low
tests/openclaw-plugin-manifest.test.ts modified +1/-1 Test coverage Low
tests/qa-lab-tool-coverage.test.ts modified +7/-7 Test coverage Low

1 additional changed files omitted from this walkthrough.

Review Signal

Validated inline findings: 7 (P0: 0, P1: 1, P2: 3, P3: 3).
Dropped findings before posting: 0. High-severity findings: 1.

Risk Taxonomy

  • Docs only: 1
  • Flaky test risk: 1
  • Migration: 1
  • Runtime correctness: 3
  • Security boundary: 1

Validation and Proof

2 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
  • required: CI/release smoke proof - CI, release, launchd, or package metadata changed. Proof: green GitHub check; release-status; coverage-audit; rollback note.
    Proof status: missing - 1 required validation/proof recommendation(s) missing from PR metadata.
    Profile validation hints: Call out evidence leakage, replay/collision risks, duplicate side effects, and brittle sanitizer logic.
    Profile proof expectations: Look for focused sanitizer, signature, orchestration, or fixture proof.

Related Context

Related issues/PRs: #787, #797, #798, #799.
Suggested labels: bug, docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Suggested labels (suggestion_only); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: orchestration, security, regression-hardening
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread packages/adapters/src/index.ts Outdated
Comment thread packages/mcp-server/src/codex-control-router.ts
Comment thread packages/adapters/src/codex-jsonrpc.ts
Comment thread packages/adapters/src/codex-jsonrpc.ts
Comment thread docs/SETUP.md
Comment thread packages/mcp-server/src/codex-control-router.ts
Comment thread packages/mcp-server/src/codex-control-router.ts
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #800 - LCO 1.7: Eva remote Codex control
Head: e472ad0b39cef070d8136228bdaa325e66352a23
Updated: 2026-07-30T11:14:13.080Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #800

Review URL: #800 (review)

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #800 - LCO 1.7: Eva remote Codex control
Head: e472ad0b39cef070d8136228bdaa325e66352a23 into main. Review event: COMMENT.
Provider: Unregistered provider id (builtin:zai-coding-plan, zcode (registry miss), model unknown).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
README.md modified +20/-2 Documentation Low
docs/BETA_RELEASE_RUNBOOK.md modified +1/-1 Documentation Low
docs/CLAIM_AUDIT.md modified +10/-4 Documentation Low
docs/HERMES_ADAPTER_BOUNDARY.md modified +17/-2 Documentation Low
docs/SETUP.md modified +33/-4 Documentation Low
docs/releases/CHANGELOG.md modified +2/-1 Documentation Low
docs/releases/RELEASE_NOTES_1.7.0.md added +53/-0 Documentation Low
package-lock.json modified +37/-2 Configuration Low
package.json modified +5/-1 Configuration Low
packages/adapters/src/codex-jsonrpc.ts modified +158/-22 Changed file Moderate: validated P2 finding
packages/adapters/src/index.ts modified +108/-23 Changed file Elevated: validated P1 finding
packages/adapters/src/policy.ts modified +2/-0 Changed file Low
packages/cli/src/hermes-smoke.ts modified +2/-0 Changed file Low
packages/mcp-server/src/codex-control-router.ts added +367/-0 Changed file Moderate: validated P2 finding
packages/mcp-server/src/codex-runtime-transport.ts added +73/-0 Changed file Moderate: validated P2 finding
packages/mcp-server/src/server-runtime.ts modified +6/-18 Changed file Low
packages/mcp-server/src/tools.ts modified +65/-8 Changed file Low
packages/openclaw-plugin/openclaw.plugin.json modified +187/-23 Changed file Elevated: large change
tests/bridge-safety-core.test.ts modified +89/-0 Test coverage Low
tests/codex-control-router.test.ts added +452/-0 Test coverage Elevated: large change
tests/codex-runtime-transport.test.ts added +45/-0 Test coverage Low
tests/control-and-mcp.test.ts modified +38/-5 Test coverage Low
tests/hermes-smoke.test.ts modified +1/-1 Test coverage Low
tests/openclaw-plugin-manifest.test.ts modified +1/-1 Test coverage Low
tests/qa-lab-tool-coverage.test.ts modified +7/-7 Test coverage Low

1 additional changed files omitted from this walkthrough.

Review Signal

Validated inline findings: 6 (P0: 0, P1: 2, P2: 4, P3: 0).
Dropped findings before posting: 0. High-severity findings: 2.

Risk Taxonomy

  • Auth: 1
  • Runtime correctness: 5

Validation and Proof

2 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
  • required: CI/release smoke proof - CI, release, launchd, or package metadata changed. Proof: green GitHub check; release-status; coverage-audit; rollback note.
    Proof status: missing - 1 required validation/proof recommendation(s) missing from PR metadata.
    Profile validation hints: Call out evidence leakage, replay/collision risks, duplicate side effects, and brittle sanitizer logic.
    Profile proof expectations: Look for focused sanitizer, signature, orchestration, or fixture proof.

Related Context

Related issues/PRs: #787, #797, #798, #799.
Suggested labels: bug, docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Suggested labels (suggestion_only); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: orchestration, security, regression-hardening
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread packages/adapters/src/index.ts
Comment thread packages/adapters/src/index.ts
Comment thread packages/mcp-server/src/codex-runtime-transport.ts
Comment thread packages/mcp-server/src/codex-control-router.ts
Comment thread packages/mcp-server/src/codex-control-router.ts
Comment thread packages/adapters/src/codex-jsonrpc.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
packages/adapters/src/codex-jsonrpc.ts (1)

577-611: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Persistent clients accumulate notifications across requests, which now leaks into every response.

CodexJsonRpcClient.notifications is append-only and each requestRaw/turn-resolution result returns [...this.notifications]. With persistent: true the same client instance now serves many requests, so:

  • response payloads grow unbounded over the daemon connection's lifetime, and
  • a later turn's proof/result carries notifications emitted for earlier, unrelated turns, which is exactly the signal liveProofState/turnResolutionFromResponse consumers interpret.

Stdio mode was immune because each request got a fresh client. Consider snapshotting per-request (e.g. capture notifications.length at request start and return only the delta), or bounding the buffer.

#!/bin/bash
# Inspect how response.notifications is consumed for proof/turn state.
rg -nP -C3 '\bnotifications\b' packages/adapters/src/codex-jsonrpc.ts | head -80
rg -nP -C3 'notificationMethods|response\.notifications' packages/adapters/src/index.ts | head -60
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/adapters/src/codex-jsonrpc.ts` around lines 577 - 611, Prevent
persistent CodexJsonRpcClient notifications from leaking across requests by
scoping returned notifications to the current request. Update requestRaw and
turn-resolution response construction to capture the notifications length at
request start and return only newly emitted entries, preserving existing
behavior for fresh clients and live proof/turn consumers.
packages/mcp-server/src/tools.ts (1)

1642-1648: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Spread schemaExtras before the fixed schema keys.

As written, extras take precedence and can override type, additionalProperties: false, properties, or required — silently weakening the plugin-boundary guard at validateOpenClawToolInput. Ordering extras first keeps anyOf working while making the invariants unoverridable.

♻️ Proposed fix
     inputSchema: {
+      ...schemaExtras,
       type: "object",
       additionalProperties: false,
       properties,
-      ...(required.length > 0 ? { required } : {}),
-      ...schemaExtras
+      ...(required.length > 0 ? { required } : {})
     },
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/mcp-server/src/tools.ts` around lines 1642 - 1648, Update the
inputSchema object in the tool definition so schemaExtras is spread before the
fixed type, additionalProperties, properties, and conditional required fields.
Preserve schemaExtras support, including anyOf, while ensuring
validateOpenClawToolInput’s fixed schema invariants cannot be overridden.
packages/mcp-server/src/server-runtime.ts (1)

103-121: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Transport misconfiguration surfaces as tool_registry_unavailable.

createConfiguredCodexClients() throws for an unknown LCO_CODEX_TRANSPORT or a relative LCO_CODEX_DAEMON_SOCKET, and the bare catch maps that to tool_registry_unavailable while discarding the message. For an opt-in transport flag, misconfiguration is the most likely first-run failure and the operator gets no pointer to the env var. Split the client construction into its own guarded step with a distinct code.

🩺 Proposed fix
+  let codexClients: ReturnType<typeof createConfiguredCodexClients>;
+  try {
+    codexClients = createConfiguredCodexClients();
+  } catch {
+    db.close();
+    return { ok: false, failure: createStartupUnavailableResult("codex_transport_unavailable") };
+  }
+
   try {
-    const codexClients = createConfiguredCodexClients();
     runtimeState = {

Requires codex_transport_unavailable to be an accepted createStartupUnavailableResult reason.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/mcp-server/src/server-runtime.ts` around lines 103 - 121, Update the
startup flow around createConfiguredCodexClients so transport-client
construction is guarded separately from createLooTools initialization. Catch
transport configuration errors and return createStartupUnavailableResult with
the distinct codex_transport_unavailable reason, preserving cleanup and the
existing tool_registry_unavailable result for tool registry failures; ensure the
new reason is accepted by createStartupUnavailableResult.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/adapters/src/codex-jsonrpc.ts`:
- Around line 527-546: Harden the persistent reconnect flow around the queued
operation: ensure a failed persistentClient.connect() immediately closes the
newly created client, clears persistentClient, and rethrows the connection
error. Also pre-validate the requested method with assertCodexMethodAllowed
before entering withClient, matching requestSequence, so policy rejections do
not trigger the catch block’s connection teardown.

In `@packages/adapters/src/index.ts`:
- Around line 846-849: Update the approval reuse check around
assertCodexControlTransportCapability to scan audit records by time rather than
limiting the search to audit.tail(1000). Inspect records newer than
previous.createdAt (or continue scanning until passing the dry-run record), and
preserve the existing error when a matching approvalAuditId is found.
- Around line 903-913: Replace the bare catch around the direct request in the
rawResponse assignment with the same error classifier used by the sequence path
near line 872. Preserve deterministic errors such as policy rejections and only
map errors classified as indeterminate to codex_control_attempt_indeterminate;
rethrow all other errors unchanged.
- Around line 1387-1398: Update isIndeterminateControlResponse and
isIndeterminateControlError to remove the broad bare socket and websocket
alternatives, matching only concrete transport I/O failure patterns such as
socket hang up/closed and EPIPE alongside the existing timeout, connection,
reset, and broken-pipe patterns. Ensure deterministic validation errors like the
absolute Unix socket path requirement no longer normalize to
codex_control_attempt_indeterminate.
- Around line 673-675: Make the tail capability required on ControlAuditStore so
approval-reuse detection in the live control execution path cannot be skipped.
Update the ControlAuditStore type near its definition and adjust any affected
implementations or test doubles to provide tail; do not leave the optional-chain
behavior in the approval check as a fail-open path.

In `@packages/mcp-server/src/codex-control-router.ts`:
- Around line 211-243: Bound the loaded-thread enumeration in loadDaemonTargets
by applying a documented maximum to the ids returned by loadedThreadIds, and
surface an explicit reason code or equivalent result metadata when truncation
occurs. Replace the strictly serial per-thread reads with concurrency-limited
processing if supported by the shared CodexClient transport, while preserving
TargetProjection filtering and active-thread refresh behavior.
- Around line 74-84: The hint contract must match title sanitization and its
160-character limit. In packages/mcp-server/src/codex-control-router.ts lines
74-84, update the hint matching flow to pass the trimmed hint through
sanitizeTitle before comparing it with target.title, while preserving threadId
matching. In packages/mcp-server/src/tools.ts lines 1105-1109, reduce the hint
schema maxLength from 240 to 160, or reuse a shared title-length constant.
- Around line 169-181: Update selectedRoute to prune expired entries from the
targets map before inserting each new ref. Remove entries whose expiresAtMs is
at or before the current timestamp, then retain the existing target storage and
routeResult behavior for the newly selected target.

In `@packages/mcp-server/src/codex-runtime-transport.ts`:
- Around line 52-57: Update the daemon read wrapper around codexReadClient so it
delegates the complete CodexClient surface, not only request, while preserving
assertCodexMethodAllowed(method, "read") for every read request. Ensure members
such as requestSequenceUntilTurnResolved remain available in daemon mode and
retain the shared persistent connection and read-only enforcement behavior.

In `@packages/mcp-server/src/tools.ts`:
- Around line 1133-1148: Update the lco_codex_interrupt_thread handler to reject
inputs that contain both target_ref and the explicit thread_id/expected_turn_id
pair before dispatching. Preserve the existing target_ref and raw-thread paths
for unambiguous inputs, and replace the nested ternary with a guarded named
handler if needed to make the ambiguity check clear.

In `@tests/bridge-safety-core.test.ts`:
- Around line 908-914: Replace the fixed delay after sockets[0]?.close() with
polling of the server-side connection/transport state until the close is
observed, then issue the thread/loaded/list request. Keep the existing reconnect
and header/method assertions unchanged, and use the test’s existing state or
helper symbols where available.

In `@tests/codex-runtime-transport.test.ts`:
- Around line 29-45: Add a successful assertion in the test covering
resolveCodexRuntimeTransportConfig that supplies an absolute
LCO_CODEX_DAEMON_SOCKET alongside CODEX_HOME-related inputs, then verify the
resolved daemon socket uses that absolute override rather than CODEX_HOME
resolution. Keep the existing relative-path rejection and unknown-transport
assertions unchanged.

In `@tests/tool-exposure-profile.test.ts`:
- Around line 368-371: Update the lco_codex_deliver sample input in the
tool-exposure test to explicitly set dry_run to true alongside target_ref and
message. Keep the existing values and behavior unchanged while preventing
reliance on the schema default.

---

Outside diff comments:
In `@packages/adapters/src/codex-jsonrpc.ts`:
- Around line 577-611: Prevent persistent CodexJsonRpcClient notifications from
leaking across requests by scoping returned notifications to the current
request. Update requestRaw and turn-resolution response construction to capture
the notifications length at request start and return only newly emitted entries,
preserving existing behavior for fresh clients and live proof/turn consumers.

In `@packages/mcp-server/src/server-runtime.ts`:
- Around line 103-121: Update the startup flow around
createConfiguredCodexClients so transport-client construction is guarded
separately from createLooTools initialization. Catch transport configuration
errors and return createStartupUnavailableResult with the distinct
codex_transport_unavailable reason, preserving cleanup and the existing
tool_registry_unavailable result for tool registry failures; ensure the new
reason is accepted by createStartupUnavailableResult.

In `@packages/mcp-server/src/tools.ts`:
- Around line 1642-1648: Update the inputSchema object in the tool definition so
schemaExtras is spread before the fixed type, additionalProperties, properties,
and conditional required fields. Preserve schemaExtras support, including anyOf,
while ensuring validateOpenClawToolInput’s fixed schema invariants cannot be
overridden.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 58503632-85c1-43d5-8473-4fe99fe96e29

📥 Commits

Reviewing files that changed from the base of the PR and between 664955f and a6f9de3.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (27)
  • .codex-plugin/plugin.json
  • README.md
  • docs/BETA_RELEASE_RUNBOOK.md
  • docs/CLAIM_AUDIT.md
  • docs/HERMES_ADAPTER_BOUNDARY.md
  • docs/SETUP.md
  • docs/releases/CHANGELOG.md
  • docs/releases/RELEASE_NOTES_1.7.0.md
  • openclaw.plugin.json
  • package.json
  • packages/adapters/src/codex-jsonrpc.ts
  • packages/adapters/src/index.ts
  • packages/adapters/src/policy.ts
  • packages/cli/src/hermes-smoke.ts
  • packages/mcp-server/src/codex-control-router.ts
  • packages/mcp-server/src/codex-runtime-transport.ts
  • packages/mcp-server/src/server-runtime.ts
  • packages/mcp-server/src/tools.ts
  • packages/openclaw-plugin/openclaw.plugin.json
  • tests/bridge-safety-core.test.ts
  • tests/codex-control-router.test.ts
  • tests/codex-runtime-transport.test.ts
  • tests/control-and-mcp.test.ts
  • tests/hermes-smoke.test.ts
  • tests/openclaw-plugin-manifest.test.ts
  • tests/qa-lab-tool-coverage.test.ts
  • tests/tool-exposure-profile.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: test
🧰 Additional context used
📓 Path-based instructions (2)
docs/SETUP.md

📄 CodeRabbit inference engine (AGENTS.md)

Keep detailed first-run instructions in docs/SETUP.md.

Files:

  • docs/SETUP.md
README.md

📄 CodeRabbit inference engine (AGENTS.md)

README.md: Keep README.md as the public landing page: product value, install, setup, first workflow, OpenClaw/MCP entrypoints, safety boundaries, and links.
Do not put active sprint ledgers, long issue history, exhaustive release-gate command inventories, or internal agent maintenance loops into the public README.md; link VISION.md, GitHub trackers, or runbooks instead.

Files:

  • README.md
🪛 ast-grep (0.45.0)
packages/adapters/src/codex-jsonrpc.ts

[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawn, spawnSync, type ChildProcessWithoutNullStreams } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)


[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawn, spawnSync, type ChildProcessWithoutNullStreams } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)


[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawn, spawnSync, type ChildProcessWithoutNullStreams } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)


[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawn, spawnSync, type ChildProcessWithoutNullStreams } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)


[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawn, spawnSync, type ChildProcessWithoutNullStreams } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)


[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawn, spawnSync, type ChildProcessWithoutNullStreams } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)

🪛 LanguageTool
docs/HERMES_ADAPTER_BOUNDARY.md

[style] ~56-~56: Since ownership is already implied, this phrasing may be redundant.
Context: ...the shared LCO daemon-control tools and its own Computer Use integration. - No claim th...

(PRP_OWN)

README.md

[grammar] ~390-~390: Use a hyphen to join words.
Context: ... only to the already-running local Codex managed daemon through its Unix socket. ...

(QB_NEW_EN_HYPHEN)

🔇 Additional comments (44)
packages/adapters/src/codex-jsonrpc.ts (4)

385-406: socket.once("error") still leaves long-lived connections one error away from an unhandled error event.

After open, that single listener is consumed by the first mid-stream error (rejecting an already-settled promise, i.e. a no-op), so a second error event has no listener and crashes the process. Same shape as previously flagged.


2-14: LGTM!

Also applies to: 159-162


490-504: LGTM!


408-411: 🩺 Stability & Availability

Guard sendJson when the socket is no longer open.

await this.ready only covers the initial connection; after a later close, socket.send() can fail on a non-OPEN transport instead of rejecting this call cleanly. Add a last-moment readyState/closed check or pass a send callback so reconnect logic can handle the failure deterministically.

package.json (2)

3-3: LGTM!

Also applies to: 78-81


82-83: 🔒 Security & Privacy

No action needed for ws ^8.21.1 already includes the patched release.

tests/bridge-safety-core.test.ts (1)

3-8: LGTM!

Also applies to: 17-21, 861-907, 915-944

packages/adapters/src/index.ts (3)

708-708: LGTM!

Also applies to: 810-810, 836-836


990-990: LGTM!

Also applies to: 1008-1019


1353-1378: LGTM!

tests/control-and-mcp.test.ts (2)

483-496: LGTM!

Also applies to: 539-548, 1638-1639, 1669-1672, 1880-1884


1885-1890: 🎯 Functional Correctness

No duplicate error member here

The inline type assertion declares error?: { message?: string } only once, so this is not a duplicate-identifier issue.

			> Likely an incorrect or invalid review comment.
.codex-plugin/plugin.json (1)

3-3: LGTM!

openclaw.plugin.json (1)

5-5: LGTM!

Also applies to: 56-57, 95-96, 1330-1330, 1390-1460, 1543-1543, 1652-1702, 3253-3253, 3314-3386, 3471-3471, 3583-3634, 7078-7079

packages/openclaw-plugin/openclaw.plugin.json (1)

5-5: LGTM! Root and package manifests stay in lockstep — canonical/alias declarations, anyOf interrupt contract, tier demotions, and facade list all match.

Also applies to: 56-57, 95-96, 1330-1330, 1390-1460, 1543-1543, 1652-1702, 3253-3253, 3314-3386, 3471-3471, 3583-3634, 7078-7079

tests/openclaw-plugin-manifest.test.ts (1)

154-154: LGTM!

tests/qa-lab-tool-coverage.test.ts (1)

124-131: LGTM! Tier counts still sum to the declared total (9+19+8+3 = 39), and the demotion/addition math is internally consistent.

Also applies to: 159-159, 399-400, 601-601

tests/tool-exposure-profile.test.ts (1)

71-71: LGTM!

Also applies to: 83-84, 151-153

docs/releases/RELEASE_NOTES_1.7.0.md (2)

1-22: LGTM! Highlights, opt-in transport framing, and the safety boundary match the PR scope (no Codex start/restart, no Remote Control, approval-bound delivery).

Also applies to: 28-53


23-26: 📐 Maintainability & Code Quality

Keep the install command as-is The active npm package is lossless-codex-orchestrator; lossless-openclaw-orchestrator is the deprecated compatibility alias. No change needed here.

			> Likely an incorrect or invalid review comment.
README.md (2)

313-316: LGTM!


382-393: 🎯 Functional Correctness

Verify the documented Codex environment-variable aliases.

All three documents expose LCO_CODEX_TRANSPORT, LCO_CODEX_DAEMON_SOCKET, and LCO_CODEX_APP_SERVER_ARGS, while the supplied runtime contract calls readEnv("CODEX_*", env). Confirm that the environment reader maps these documented names; otherwise daemon configuration may silently remain on stdio.

  • README.md#L382-L393: add or verify the alias contract for the public configuration.
  • docs/HERMES_ADAPTER_BOUNDARY.md#L30-L36: keep Hermes daemon guidance consistent with runtime resolution.
  • docs/SETUP.md#L348-L360: add a setup-level regression test for daemon selection and socket override.
docs/BETA_RELEASE_RUNBOOK.md (1)

448-448: LGTM!

docs/CLAIM_AUDIT.md (1)

3-13: LGTM!

Also applies to: 60-64, 111-111

docs/HERMES_ADAPTER_BOUNDARY.md (1)

11-12: LGTM!

Also applies to: 55-56

docs/SETUP.md (1)

413-413: LGTM!

Also applies to: 594-600

docs/releases/CHANGELOG.md (1)

7-9: LGTM!

packages/mcp-server/src/codex-control-router.ts (6)

119-137: Previously flagged: idle send has no turn-resolution proof, and the catch collapses approval-mismatch into a generic reason.

Both remain as-is on this revision (loadedThread:true + awaitTurn:false for the idle path; approval_or_control_rejected covering stale-approval and daemon failure alike). See prior comments on lines 119 and 129.


1-52: LGTM!


140-167: LGTM!


183-206: LGTM!


261-291: LGTM!


293-367: LGTM! Redaction before truncation in sanitizeTitle is the right order — no partially-sliced secret can escape.

tests/codex-control-router.test.ts (2)

250-268: Idle live delivery is still only asserted at status === "accepted".

This is the test-side of the previously flagged proof gap on codex-control-router.ts line 119: nothing here pins completed === false / control_sent === true for a fire-and-forget idle send, so a future change that starts deriving completed from control_sent would pass silently.


23-117: LGTM! The forbidden-substring canaries (thread id, turn id, transcript, absolute path) plus the includeTurns call-shape assertions and the approval-replay/indeterminate cases are exactly the right regression surface.

Also applies to: 119-208, 285-442

packages/mcp-server/src/codex-runtime-transport.ts (1)

16-38: LGTM! Unknown modes and relative socket overrides both fail closed, and reading CODEX_HOME directly (unprefixed) while everything else goes through the LCO_-prefixed readEnv is the right split.

packages/mcp-server/src/server-runtime.ts (1)

5-7: LGTM!

Also applies to: 20-20

tests/codex-runtime-transport.test.ts (1)

6-27: LGTM! Passing env explicitly instead of mutating process.env keeps these hermetic.

packages/adapters/src/policy.ts (1)

180-181: LGTM! readOnly for route (metadata reads only) and approvalGatedControl for deliver (idle send / active steer) match the existing codex_direct control entries.

packages/mcp-server/src/tools.ts (3)

470-479: LGTM! Scoping the anyOf interpretation to required sets (and keeping the message field-free) is the right minimal extension for this boundary validator.


553-556: LGTM! Reads routed through codexReadClient while mutations go via control keeps the surface split intact.


233-242: 📐 Maintainability & Code Quality

Ensure operatorPathRank 8 and 9 are unique

  • Check these don’t collide with the rest of LOO_TOOL_SURFACE; duplicate ranks would scramble operator-path ordering.
packages/cli/src/hermes-smoke.ts (1)

18-19: LGTM! Names match the registrations in tools.ts, and inserting mid-array leaves the slice(0, -1) omit-a-tool fixture in tests/hermes-smoke.test.ts intact.

tests/hermes-smoke.test.ts (1)

39-39: LGTM! 16 matches the updated EVA_HERMES_REQUIRED_LCO_TOOLS exactly.

Comment thread packages/adapters/src/codex-jsonrpc.ts
Comment thread packages/adapters/src/index.ts
Comment thread packages/adapters/src/index.ts
Comment thread packages/adapters/src/index.ts
Comment thread packages/adapters/src/index.ts
Comment thread packages/mcp-server/src/codex-runtime-transport.ts
Comment thread packages/mcp-server/src/tools.ts
Comment thread tests/bridge-safety-core.test.ts
Comment thread tests/codex-runtime-transport.test.ts
Comment thread tests/tool-exposure-profile.test.ts
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

evaOS review status: completed

PR: #800 - LCO 1.7: Eva remote Codex control
Head: cc971ef9628c61610c201f0cd56307abe3c17dba
Updated: 2026-07-30T11:21:55.124Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #800

Review URL: #800 (review)

@100yenadmin

Copy link
Copy Markdown
Owner Author

Current-head review dispositions

Candidate: cc971ef9628c61610c201f0cd56307abe3c17dba

Fixed now

  • Approval reuse is fail-closed, checked against full audit history, claimed before transport, and regression-tested after 1,000 unrelated records.
  • A rejected one-shot turn/start now returns blocked with control_sent:false; it is never recorded or reported as accepted.
  • Persistent-client notifications are reset per operation and response notifications retain method names only, preventing prior turn content from accumulating or entering public control results.
  • Direct deterministic failures remain deterministic; only concrete timeout/connection/closed-socket/reset/pipe signals produce the indeterminate, consumed-do-not-retry result.

False or not applicable

  • Same-process claim/check concurrency: the full-history check and append are consecutive synchronous operations with no yield, and the supported Hermes runtime has one audit writer. Cross-process sharing of one audit file is not a supported 1.7 path.
  • Read-wrapper reconnect leak: daemon reads delegate to the same persistent client's request, whose withClient path closes and clears the client on request failure.
  • Read timeout truncation: readLine may yield no frame at the transport interval, but the caller continues until its own deadline; it does not convert the first empty interval into completion or failure.
  • WebSocket fragmentation: ws emits complete messages after frame reassembly; the app-server contract is JSON text and compression is disabled.
  • Idle delivery proof: accepted is deliberately distinct from completed; no turn-completion claim is made.
  • Active-target selection and missing-turn handling match the approved deterministic, fail-closed routing contract.

Accepted tradeoffs or existing follow-up

  • One serialized persistent daemon connection is intentional so loaded-task ownership and control ordering stay coherent. Current Eva scale is a small loaded-task set, not the historical session corpus.
  • Target refs expire and are revalidated before mutation. Opportunistic map pruning, capped loaded-target enumeration, per-target read-failure isolation, finer daemon/application reason codes, and daemon-mode status diagnostics are non-blocking follow-up candidates under Hermes: discover and deliver into the current active Codex turn #797 if Eva's runtime canary demonstrates impact.
  • Native OpenClaw-plugin daemon routing is outside this Hermes-first release; generic stdio/OpenClaw compatibility remains unchanged.
  • The daemon-first Hermes YAML is intentionally the Eva/operator recipe and already states that the managed daemon must be running and no fallback occurs.
  • More detailed approval error codes, reconnect cleanup refinements, hint normalization, dual-form interrupt rejection, and the suggested test-only nits are useful robustness or UX ideas but do not block the named 1.7 path and will not widen this release.

Proof remains separated: current-head CI/review prove source readiness; package and isolated Hermes canaries prove the candidate; merge, publication, Eva installation, Telegram direction, and Desktop CUA each require their own evidence.

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #800 - LCO 1.7: Eva remote Codex control
Head: cc971ef9628c61610c201f0cd56307abe3c17dba into main. Review event: COMMENT.
Provider: Unregistered provider id (builtin:zai-coding-plan, zcode (registry miss), model unknown).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
README.md modified +20/-2 Documentation Low
docs/BETA_RELEASE_RUNBOOK.md modified +1/-1 Documentation Low
docs/CLAIM_AUDIT.md modified +10/-4 Documentation Low
docs/HERMES_ADAPTER_BOUNDARY.md modified +17/-2 Documentation Low
docs/SETUP.md modified +33/-4 Documentation Low
docs/releases/CHANGELOG.md modified +2/-1 Documentation Low
docs/releases/RELEASE_NOTES_1.7.0.md added +53/-0 Documentation Low
package-lock.json modified +37/-2 Configuration Low
package.json modified +5/-1 Configuration Low
packages/adapters/src/codex-jsonrpc.ts modified +176/-26 Changed file Moderate: validated P3 finding
packages/adapters/src/index.ts modified +132/-23 Changed file Moderate: validated P3 finding
packages/adapters/src/policy.ts modified +2/-0 Changed file Low
packages/cli/src/hermes-smoke.ts modified +2/-0 Changed file Low
packages/mcp-server/src/codex-control-router.ts added +368/-0 Changed file Moderate: validated P2 finding
packages/mcp-server/src/codex-runtime-transport.ts added +73/-0 Changed file Low
packages/mcp-server/src/server-runtime.ts modified +6/-18 Changed file Low
packages/mcp-server/src/tools.ts modified +65/-8 Changed file Low
packages/openclaw-plugin/openclaw.plugin.json modified +187/-23 Changed file Elevated: large change
tests/bridge-safety-core.test.ts modified +115/-0 Test coverage Low
tests/codex-control-router.test.ts added +493/-0 Test coverage Elevated: large change
tests/codex-runtime-transport.test.ts added +45/-0 Test coverage Low
tests/control-and-mcp.test.ts modified +64/-5 Test coverage Low
tests/hermes-smoke.test.ts modified +1/-1 Test coverage Low
tests/openclaw-plugin-manifest.test.ts modified +1/-1 Test coverage Low
tests/qa-lab-tool-coverage.test.ts modified +7/-7 Test coverage Low

1 additional changed files omitted from this walkthrough.

Review Signal

Validated inline findings: 4 (P0: 0, P1: 0, P2: 2, P3: 2).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Proof gap: 1
  • Runtime correctness: 3

Validation and Proof

2 required validation/proof recommendation(s) selected from changed files.

  • required: TypeScript/web build or CI proof - Runtime TypeScript/web files or package/config files changed. Proof: npm run build; typecheck; focused Vitest; green GitHub check.
  • required: CI/release smoke proof - CI, release, launchd, or package metadata changed. Proof: green GitHub check; release-status; coverage-audit; rollback note.
    Proof status: missing - 1 required validation/proof recommendation(s) missing from PR metadata.
    Profile validation hints: Call out evidence leakage, replay/collision risks, duplicate side effects, and brittle sanitizer logic.
    Profile proof expectations: Look for focused sanitizer, signature, orchestration, or fixture proof.

Related Context

Related issues/PRs: #787, #797, #798, #799.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Suggested labels (suggestion_only); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: orchestration, security, regression-hardening
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread packages/mcp-server/src/codex-control-router.ts
Comment thread packages/mcp-server/src/codex-control-router.ts
Comment thread packages/adapters/src/index.ts
Comment thread packages/adapters/src/codex-jsonrpc.ts
@100yenadmin

Copy link
Copy Markdown
Owner Author

Latest-head review delta dispositions

Head: cc971ef9628c61610c201f0cd56307abe3c17dba

  • accepted is intentionally not completed; callers must observe or re-route rather than infer turn completion. A consumed approval prevents a double-send. Accepted tradeoff for 1.7.
  • The idle validation/send race is fail-closed: if state changes and turn/start is rejected, the new response handling returns blocked with control_sent:false. It cannot silently convert into a steer. Accepted tradeoff.
  • A definite rejected response leaves the durable claimed record and public rejected result. A separate terminal audit-state taxonomy would be useful incident ergonomics, but is not required to prove single use or this release gate. Accepted tradeoff.
  • Only the Unix-socket transport is constructed with persistent:true, and it implements isClosed. Non-UDS transports are not persistent. Not applicable.

No further code change is warranted for these comments under the bounded 1.7 gate.

@100yenadmin
100yenadmin merged commit 78bd6e7 into main Jul 30, 2026
4 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cc971ef962

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +863 to +866
if (options.audit.hasApprovalUse(previous.id)) {
throw new Error("approval_audit_id has already been used");
}
options.audit.append({

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Claim approval IDs atomically across runtimes

When two MCP, CLI, or native-plugin processes share the default audit file and concurrently submit the same live approval_audit_id, both can finish hasApprovalUse() before either appends its claim. Each process then records a claim and sends the live control, allowing one approval to execute twice. Replace this check-then-append sequence with a filesystem-locked or otherwise atomic claim operation.

Useful? React with 👍 / 👎.

Comment on lines +509 to +512
return createCodexClientFromTransport(
() => new UnixSocketWebSocketTransport(options.socketPath, options.timeoutMs),
{ ...options, persistent: true }
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve daemon server requests between operations

When any daemon-owned turn emits a JSON-RPC server request—such as an approval, user-input, or MCP elicitation request—while an ordinary thread/loaded/list or thread/read call is awaiting its response, requestRaw() discards the message because its ID differs from the client request. Making this connection persistent leaves the daemon request assigned to a client that can no longer observe or answer it, so the active turn can remain stuck and later turn proof omits the pending server request. Demultiplex and retain server requests across daemon operations, or close the connection when one cannot be handled.

Useful? React with 👍 / 👎.

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

Labels

codex Codex session indexing or control documentation Improvements or additions to documentation mcp MCP server and tool surface orchestrator Orchestrator-agent workflow, context retention, and session management safety Safety, approval, privacy, or control-boundary issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hermes: discover and deliver into the current active Codex turn Feature: support Codex app-server daemon UDS transport for resumable local control

1 participant