Skip to content

Resolve selected capability roots without starting executors - #31581

Merged
jif-oai merged 3 commits into
mainfrom
jif/passive-selected-root-inspection
Jul 9, 2026
Merged

Resolve selected capability roots without starting executors#31581
jif-oai merged 3 commits into
mainfrom
jif/passive-selected-root-inspection

Conversation

@jif-oai

@jif-oai jif-oai commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Why

A thread can select skill roots that live in an executor environment. skills/list needs a passive snapshot of the roots that are usable now: it must not start an executor, wait for recovery, or reconnect a failed environment.

The initial implementation checked the immutable first startup result. After a successful connection later entered recovery or failed, that result still looked successful. A read-only catalog request could then wait for recovery or trigger a new connection while reading the filesystem.

What

  • inspect readiness from the current exec-server connection state
  • return roots only while their environment can serve a request immediately
  • omit environments that have not started, are connecting, or are recovering
  • return warnings for missing environments and terminal connection failures
  • add a fail-fast filesystem view that never starts, waits for, or reconnects an environment
  • expose the passive selected-root snapshot through CodexThread

Behavior

  • Local and currently connected environments are ready.
  • Starting and recovering environments are omitted without a warning so callers can retry later.
  • Missing and terminally failed environments are omitted with a warning.
  • A disconnect between readiness inspection and filesystem access fails promptly instead of crossing into the normal recovery path.
  • Normal model-turn and execution paths keep their existing reconnect behavior.

Design

The recovery policy is private to the exec-server client. Callers choose the explicit fail-fast filesystem method; the existing client and filesystem APIs remain reconnecting. This keeps the passive contract at the transport boundary instead of plumbing timeout or retry flags through the skills stack.

Coverage

  • a lazy stdio environment stays unstarted during passive inspection
  • missing and terminally failed environments surface warnings
  • a real websocket disconnect proves current readiness drops, a previously acquired fail-fast filesystem handle returns promptly, and readiness returns after recovery

Scope

This PR only provides passive readiness and fail-fast filesystem primitives. It does not add app-server API fields or notifications.

Stack

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

Copy link
Copy Markdown
Contributor

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: 3b391fe7ed

ℹ️ 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 codex-rs/ext/skills/src/provider/executor.rs Outdated
Comment thread codex-rs/ext/skills/src/extension.rs Outdated
@jif-oai
jif-oai force-pushed the jif/passive-selected-root-inspection branch from 3b391fe to d4a1b7d Compare July 8, 2026 17:23
@jif-oai
jif-oai merged commit 13ba805 into main Jul 9, 2026
32 of 35 checks passed
@jif-oai
jif-oai deleted the jif/passive-selected-root-inspection branch July 9, 2026 10:17
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants