bug: agentop uninstall leaves Codex routed to the stopped proxy

未关闭 适合新手
#1,881 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github, go
领域
cli

调研方向

阅读 cmd/agentop/cmd_uninstall.go 中 planUninstall 附近的代码,以及 cmd/agentop/cmd_codex.go 中 Codex 禁用流程;检查现有的 unroute 步骤如何处理 needsCortexDir 和 daemon 重启。按描述更新 uninstall 用法文本和 docs/laptop-service.md。完成标准是:uninstall 删除 Codex 代理设置,在禁用模式下重启其 daemon,并且两份文档都提到 Codex。

由索引模型根据 Issue 内容生成。

描述

bug laptop

Problem

agentop uninstall does not remove the Cortex settings from Codex. After uninstall, Codex still sends every request to localhost:47600, and each request fails with "connection refused".

Reproduction (main at 676557d35, by reading the code)

  1. agentop configure codex enable. This writes HTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxy and SSL_CERT_FILE to ~/.codex/.env (codexWanted, cmd/agentop/cmd_codex.go:219-241).
  2. agentop uninstall --yes.
  3. ~/.codex/.env still has all five keys.

With --purge, uninstall also deletes ~/.cortex, which includes the CA file that SSL_CERT_FILE names. cortexDirNeededBy does not see the Codex keys.

Cause

planUninstall (cmd/agentop/cmd_uninstall.go:359-366) has steps for Claude Code, OpenCode, Bob, the Bob and Pi shells, the Pi extension and the service. It has no Codex step. No line in cmd_uninstall.go names Codex. The usage text (cmd_uninstall.go:27) and docs/laptop-service.md:1142 also do not name Codex.

docs/agents/codex.md:100 says that Codex stops working when Cortex stops while Codex is still routed.

Fix

Add a planUnrouteCodex step that calls the existing planCodexDisable and applyCodexDisable, then restarts the Codex daemon as disable does. Make it set needsCortexDir as the other unroute steps do. Add Codex to the usage text and to docs/laptop-service.md.

Impact if not fixed

Codex stops working after every uninstall, until the user edits ~/.codex/.env by hand.

主要语言
Go
星标
26
派生
46
平均合并
9 小时 55 分钟
30 天内合并 PR
257

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rossoctl/cortex 的其他 Issue

查看 rossoctl/cortex 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。