Skip to content

Windows 重启后 codex-remote daemon 不会自启动,导致飞书桥接和 9501 管理页不可用 #683

Description

@chaojidagehu-hub

类型

bug

你遇到的问题 / 你想做什么

问题

Windows 重启后,即使重新打开 Codex / VS Code,飞书侧会断开连接,http://localhost:9501/admin/ 也无法访问。

排查后发现:codex-remote.exe daemon 进程没有自动启动,9501/9502 端口也没有监听。

环境

  • OS: Windows 11
  • codex-remote-feishu: v1.8.4
  • VS Code integration: managed_shim
  • binary: C:\Users\<USER>\AppData\Local\codex-remote\bin\codex-remote.exe

观察到的状态

install-state.json 里是:

{
  "serviceManager": "detached",
  "integrations": ["managed_shim"]
}

管理接口检测 autostart 返回:

{
  "platform": "windows",
  "supported": false,
  "status": "unsupported",
  "configured": false,
  "enabled": false,
  "canApply": false
}

因此当前 Windows 安装看起来只是 detached/background 当前会话进程,重启系统后不会自动恢复。

你希望最后变成什么样

希望 Windows 用户安装/配置后,登录系统时能自动启动 codex-remote daemon,或者至少在管理页里有明确的一键启用自启动入口。

期望结果:

  • 重启 Windows 并登录后,http://localhost:9501/admin/ 自动可用
  • 9501 管理页、9502 飞书回调入口自动监听
  • 飞书 bot 不需要用户手动运行 daemon 就能恢复连接
  • 如果未配置自启动,管理页能明确提示并给出修复按钮/命令

相关证据

复现步骤

  1. 在 Windows 上完成安装和飞书配置
  2. 确认当前 http://localhost:9501/admin/ 可访问
  3. 重启电脑
  4. 登录 Windows,只打开 Codex / VS Code
  5. 访问 http://localhost:9501/admin/

实际结果

  • 管理页无法访问
  • 飞书连接断开
  • codex-remote.exe daemon 不在进程列表中
  • 9501/9502 没有监听

临时 workaround

手动启动:

Start-Process -FilePath "C:\Users\<USER>\AppData\Local\codex-remote\bin\codex-remote.exe" -ArgumentList "daemon" -WindowStyle Hidden

我本地最后用 Windows Task Scheduler 做了登录后自启动,并在启动前先检查 9501 是否已监听,避免重复启动。

已知约束 / 担心点

建议修复方向:

  • 支持 Windows autostart,例如创建 Scheduled Task
  • 管理页增加 “Enable Windows autostart” 操作
  • /api/admin/autostart/detect 支持 Windows
  • 如果 daemon 未运行,给出清晰恢复提示

注意:最好避免重复启动多个 daemon;可以先检测 9501 是否已监听。

补充说明

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:needs-investigationNeeds technical investigation before implementation can be scoped safely

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions