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

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

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
56/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
api, backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
8.7k
フォーク
649
平均マージ
16時間 1分
マージ済み PR(30日)
756

環境構築

はじめの一歩

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

backnotprop/plannotator のほかの issue

backnotprop/plannotator の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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