bug: agentop uninstall misses a Claude Code project settings file given as a relative path or as a second file
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず、cmd/agentop/cmd_claudecode.go の runClaudeCode と、issue で挙げられている recordedSettings および planUnrouteClaudeCode の各パスを確認します。設定パスと以前の値がどのように記録されるかをたどり、次に依頼された2つのテストを追加します。1つは相対設定パス、もう1つは2つ目のファイルに対する有効化を対象にします。完了条件は、uninstall と doctor が相対パスを処理でき、2回目の有効化が最初のファイル名を示すメッセージとともに拒否されることです。
索引モデルが issue の本文から書いたものです。
説明
Problem
agentop uninstall and agentop doctor can miss a Claude Code project settings file that configure claude-code enable --settings <file> changed. That project then keeps HTTPS_PROXY=localhost:47600, and Claude Code in that project fails after uninstall. No message tells the user.
There are two cases.
Case 1: a relative --settings path
- In a project directory:
agentop configure claude-code enable --settings .claude/settings.json. - Enable writes the path to the record as given (
Settings: pl.settingsPath,cmd/agentop/cmd_claudecode.go:554). It never appliesfilepath.Abs. The onlyfilepath.Abscalls in the file are for the CA paths (:384,:390). recordedSettings(cmd/agentop/cmd_doctor.go:194-199) returns""for a relative path.planUnrouteClaudeCode(cmd/agentop/cmd_uninstall.go:398-415) then checks only~/.claude/settings.json. The project file stays routed. Doctor does not check it either.
Case 2: a second project file
enable --settings /a/.claude/settings.json, thenenable --settings /b/.claude/settings.json.writeState(cmd_claudecode.go:122-144) keeps the oldPrioronly when the path is the same (:129). For a different path, it replaces the record.- The record now names only
/b. Uninstall leaves/arouted. - A later
disableon/afinds noPrior, so it deletes the managed keys. If/aheld a user value (for example a corporate proxy) before enable, that value is lost.
Fix
- Case 1:
*settingsPath, _ = filepath.Abs(*settingsPath)inrunClaudeCode(cmd_claudecode.go:277). - Case 2: refuse a second enable while the record names a different file, with a message that names the first file.
Add a test for each case.
Impact if not fixed
Claude Code in the project points at a dead proxy after uninstall. In case 2, the user's own value in the first file can be lost.
- 主要言語
- Go
- スター
- 26
- フォーク
- 46
- 平均マージ
- 9時間 55分
- マージ済み PR(30日)
- 257
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rossoctl/cortex のほかの issue
-
bug laptop
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
feat: Do not count a removed session's cost again when an import brings it back対応中かも @huang195 が今日担当しました。 オープンenhancement
rossoctl/cortex#1885 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
bug: The JWT bypass matches a cleaned path but forwards the raw path, so /mcp/../healthz skips validation対応中かも @evaline-ju が今日担当しました。 オープンbug
rossoctl/cortex#1884 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
bug: One-hour Anthropic cache writes are priced at the 5-minute rate, so spend is 37.5% too lowオープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug laptop
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
rossoctl/cortex の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
Containerpak/cpak#93 ·
-
bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
router-for-me/CLIProxyAPI#7607 ·
メンテナーはふだん 1 日以内に返信
-
enhancement ui/ux
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
myNameArnav/lex#52 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100