Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

agentop configure codex/opencode can wait on itself when an agent runs it

オープン
#1,530 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 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:

  1. The turn runs agentop configure codex enable and can't finish until agentop does.
  2. 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).
  3. The only running turn is the one waiting on agentop, so the drain waits out the whole grace.
  4. 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_ID in 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 enable with its daemon running, and record the wait and whether a daemon survives.
  • Find out what opencode service restart does 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.md and the OpenCode guide.
主要言語
Go
スター
21
フォーク
43
平均マージ
13時間 8分
マージ済み PR(30日)
267

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rossoctl/cortex のほかの issue

rossoctl/cortex の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。