agentop configure codex/opencode can wait on itself when an agent runs it
Los mantenedores suelen responder en 1 día
@Alan-Cha ya está trabajando en esto.
Desde el 28/10/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 21
- Forks
- 43
- Merge medio
- 13 h 32 min
- PR fusionados (30 d)
- 256
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de rossoctl/cortex
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
UI shows costs for all sessions even when drilled into a sessionPosiblemente ocupada @esnible la tomó hace 17 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
rossoctl/cortex#1116 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
CodeQL flags r.Host reaching slog in the forward proxy's debug/warn linesPosiblemente ocupada @evaline-ju la tomó hoy. Abierto
Dificultad 3/5 Medio día Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 Más de una semana Aptitud para principiantes 18/100
Los mantenedores suelen responder en 1 día
-
Cost/session layering: ledger snapshot logic in the HTTP layer; import edges point both waysAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
Todos los issues de rossoctl/cortex
Issues similares
-
Headerless responses block while skipping duplicate status linesPosiblemente ocupada @mynhe la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
projectdiscovery/rawhttp#554 ·
-
stage-fail
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
siyuan-note/bazaar#2447 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
superplanehq/superplane#9120 ·
Los mantenedores suelen responder en 1 día