agentop configure codex/opencode can wait on itself when an agent runs it
メンテナーはふだん 1 日以内に返信
@Alan-Cha がすでに取り組んでいます。
2026年10月28日 から。
評価
この issue はまだ評価されていません。
説明
Problem
agentop configure codex enable|disable (#1526) and agentop configure opencode enable|disable restart the agent's background service so it picks up the new proxy settings. If the agent itself runs that command — you ask Codex or OpenCode to "run agentop configure codex enable" — the restart targets the service handling the very turn that is running the command.
Codex. From Codex's source (0.163.0–0.164.0); not reproduced:
- The turn runs
agentop configure codex enableand can't finish until agentop does. - agentop runs
codex app-server daemon restart. The daemon drains running turns before stopping, for up to its shutdown grace (60s by default, configurable to 5 minutes). - The only running turn is the one waiting on agentop, so the drain waits out the whole grace.
- Then the daemon is force-stopped. agentop runs inside that turn and may be killed with it, before the new daemon starts. Codex can be left with no daemon until someone restarts it by hand.
OpenCode. Same shape: agentop runs opencode service restart on the service handling the session that asked. Not checked: whether OpenCode's restart waits for that session or cuts it off.
Claude Code has no background service, so there is nothing to restart and no exposure.
Today agentop has no check for being run by an agent in either integration.
Raised in
Review of #1526 (huang195), from Codex's source. Taken out of that PR so both integrations are handled the same way.
Possible approach
Detect that agentop is running as an agent's tool call. If it is, still write the settings but skip the restart, and print the restart command to run from a terminal.
- Codex: sets
CODEX_THREAD_IDin the environment of every command it runs for a turn (codex-rs/core/src/exec_env.rs). This is a one-line check. - OpenCode: the equivalent marker still needs to be found.
To do
- Reproduce on Codex: ask Codex to run
agentop configure codex enablewith its daemon running, and record the wait and whether a daemon survives. - Find out what
opencode service restartdoes to the session that triggered it. - Find a reliable marker for "running inside an OpenCode session".
- Apply one behaviour to both integrations, with tests, and document it in
docs/agents/codex.mdand the OpenCode guide.
- 主要言語
- Go
- スター
- 21
- フォーク
- 43
- 平均マージ
- 13時間 8分
- マージ済み PR(30日)
- 267
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rossoctl/cortex のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
UI shows costs for all sessions even when drilled into a session対応中かも @esnible が 17 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
rossoctl/cortex#1116 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
CodeQL flags r.Host reaching slog in the forward proxy's debug/warn lines対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 3/5 半日 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 1週間以上 初心者へのやさしさ 18/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
rossoctl/cortex の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
lognorman20/monaco#7428 ·
-
docs(prompts): IF BLOCKED workflow-scope branch says to comment on the issue on jira/local trackersオープンagent-butler-finding bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
jordansmall/spindrift#6238 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
microcks/microcks-cli#608 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug from-studio
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
esengine/DeepSeek-Reasonix#14868 ·
メンテナーはふだん 1 日以内に返信