OpenCode 2: a pending submit_plan review reports the session as working, not blocked

Abierto
#4,059 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
56/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
api, backend

Línea de trabajo

Start by reading the OpenCode 2 plugin code that calls runPlanReview and the session form APIs mentioned in the issue. Check how the review is opened, completed, and aborted, then compare the session status with a pending question or permission. Done means a pending review is reported as waiting for user input and the form is cleared when the review ends; the issue names no test files or code entry points.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Summary

On OpenCode 2, a session waiting on a submit_plan review reports itself as working, not blocked. Terminal multiplexers that read OpenCode's program status (OSC 7501), such as herdr, show the agent as still thinking and never notify the user that it is waiting on them.

Versions

  • @plannotator/opencode 0.29.4
  • opencode 2.4.1 (TUI program status reporting, OSC 7501)

What happens

The OpenCode 2 TUI derives each session's status from session state. In 2.4.1 this is the program-status / session-tabs code:

  • a pending permission request means state=blocked, kind=permission
  • a pending form (the question tool) means state=blocked, kind=question ("Input needs response")
  • otherwise, a running session means state=working

submit_plan waits for the decision inside the tool's execute (await runPlanReview(...)). The session stays running with no pending permission or form, so the TUI reports working for the whole review. The user gets no "needs input" signal, even though the agent cannot continue until they act in the browser.

Seen in practice: a herdr pane that showed ◈ Plannotator session ready: http://…:19433 kept status: {app: "opencode", state: "working"} until the review was submitted.

Suggested fix

While a plan review is pending, put the session into a state that OpenCode itself reports as waiting on the user. For example, create a form on the session when the review opens (the v2 plugin context appears to expose session.form.create / session.form.cancel), titled with the review URL, and cancel it when runPlanReview returns or is aborted. The same applies to the other blocking review paths (annotate, code review), if they wait inside a tool call too.

Then every OSC 7501 consumer (herdr, for example) treats a pending Plannotator review like any other question to the user.

Related

#1582 covers telling the user when a review is waiting. This issue is the OpenCode 2 host channel for that: the session's program status.

Lenguaje dominante
TypeScript
Estrellas
8.7k
Forks
649
Merge medio
16 h 1 min
PR fusionados (30 d)
756

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de backnotprop/plannotator

Todos los issues de backnotprop/plannotator

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.