Skip to content

[Bug] Windows Remote SSH 工作区中 Renderer 持续“安装中”,Harness 探测落到 Local Host #281

Description

@qiyi71w

Area

Remote

Summary

在 Windows Codex Desktop 中通过原生 SSH 工作区连接 WSL2 后,远程项目可以正常打开,WSL 上的 codexhost Remote Host 也处于 ready 状态,但 CodexHost Renderer 一直显示“安装中”。

此时 Settings → Connections 只显示 Local Host,OMP 被报告为未安装。诊断发现 OMP 探测实际发送到了 Windows Local Host,没有通过活动的 Remote SSH Host 发送到 WSL。

Renderer 当前活动 Host ID 为 remote-ssh-codex-managed:<redacted>,但从 Composer Fiber 中只能发现 Host ID 为 local 的 request manager。selectRendererRequestManager 因 Host ID 不匹配返回 null,导致 draft prewarm policy 无法安装。

Expected behavior

打开 Remote SSH 工作区后:

  1. Renderer 应取得与活动 Remote SSH Host 对应的 request target/model client。
  2. window.__codexhostDraftPrewarmPolicyV1 应使用该远端 Host 建立。
  3. Renderer Adapter 应进入 ready / request-bridge 状态。
  4. Harness discovery 和 codexhost/harness/inspect 应在 WSL Remote Host 上执行。
  5. Agent/Model 选择器应显示 WSL 上已安装的 OMP 及其模型。

Actual behavior

Remote SSH 工作区已经连接,但 Renderer 状态持续为:

state: installing
reason: draft-routing-policy-unavailable
hook: null

Renderer 中:

active execution/permissions Host:
  remote-ssh-codex-managed:<redacted>

discovered request manager:
  local

selected request manager:
  null

window.__codexhostDraftPrewarmPolicyV1:
  undefined

Settings → Connections 只显示 Local Host。OMP 状态为:

notInstalled
spawn omp ENOENT

直接通过当前 Composer request manager 调用:

codexhost/harness/inspect

请求也会发送到 Windows Local Host,并返回相同的 spawn omp ENOENT

Reproduction

  1. 在 Windows 11 安装 Codex Desktop 和 CodexHost 0.7.1 Windows installer。

  2. 在 WSL2 中通过 npm 安装相同版本的 CodexHost。

  3. 在 WSL2 中安装 OMP,并确认:

    command -v omp
    omp --version
  4. 在 WSL2 中执行:

    codexhost remote install
    codexhost remote start
    codexhost remote status
  5. 通过 Windows CodexHost 启动 Codex Desktop。

  6. 使用 Codex Desktop 原生 SSH 工作区连接 WSL2 并打开远程项目。

  7. 打开 CodexHost Settings → Connections,或查看 Agent/Model 选择器。

  8. Renderer 持续显示“安装中”,Connections 只有 Local Host,OMP 显示未安装。

Diagnostic evidence

WSL Remote Host 工作正常:

codexhost version: 0.7.1
codexhost remote status: ready

OMP path:
/home/dev/.local/bin/omp

OMP version:
18.1.18

Remote listener environment:
CODEXHOST_OMP_COMMAND=/home/dev/.local/bin/omp

直接调用 WSL 安装包内的 OMP adapter 能返回:

status: ready
models: <full model catalog>

问题发生在 Desktop Renderer 的 Host 路由阶段。

当前 packages/desktop-control/src/renderer-draft-prewarm-policy.ts 中,request manager 选择要求候选 Host ID 与活动 Host ID 相同:

const eligible = [...unique.values()].filter(
  (candidate) => activeHostId === undefined || candidate.hostId === activeHostId,
);
return eligible.length === 1 ? (eligible[0] ?? null) : null;

现场输入为:

activeHostId = remote-ssh-codex-managed:<redacted>
candidate.hostId = local

因此没有可安装的 draft prewarm policy。

packages/renderer-extension/src/versioned-renderer-adapter.ts 随后无法解析 Renderer request route,并保持:

draft-routing-policy-unavailable

Suggested investigation area

Remote SSH 工作区需要向 Renderer 暴露属于活动 SSH Host 的 request target/model client,并让以下路径使用同一个远端目标:

active Remote SSH Host
  → draft prewarm policy
  → renderer request route
  → RendererModelClient
  → codexhost/harness/inspect

建议检查:

packages/desktop-control/src/renderer-draft-prewarm-policy.ts
packages/renderer-extension/src/versioned-renderer-adapter.ts

以及 Remote SSH Host model client 注册到 Composer/Renderer 的位置。

Environment

codexhost:
  0.7.1 on Windows
  0.7.1 on WSL2

Codex Desktop:
  26.908.4834.0

Client OS:
  Windows 11 Pro x64
  build 26200

Remote OS:
  WSL2
  Ubuntu 26.04 LTS x64

Harness:
  Oh My Pi 18.1.18

Installation:
  Windows installer on client
  npm on WSL2 Remote Host

Connection:
  SSH

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:remoteSSH 与 Remote Control优先级:高影响较多用户的核心功能,但有可行的临时规避办法状态:已有解决PR已有明确针对本问题的候选解决 PR;可能仅覆盖部分需求,不代表已合并、验证通过或完整解决类型:缺陷反馈报告现有行为异常;不代表根因已确认或已完成复现

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions