Recover abandoned started agent runs after runtime shutdown

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

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

評価

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

調査の方向性

runtime handler の catch パスと、issue で説明されている既存の開始済み run の失敗処理から始めます。開始済み run がどのように永続化され、runtime の起動がどのように行われるかを追跡し、その後、中断された run の recovery テストを追加します。再起動時の recovery によって、アクティブな長時間実行 run を失敗させることなく、古い run が説明的なエラーとともに terminal 状態になることが完了条件です。

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

説明

Problem

The UI shows "Thinking" while the latest agent run remains . We fixed one runtime failure path where a handler throws after starting a run, but hard process death / laptop sleep / runtime shutdown can still leave a started run without any terminal update because the process never gets a chance to run catch/finally cleanup.

Proposed second layer

Add recovery semantics for abandoned started runs, e.g. one of:

  • a run lease / heartbeat renewed while a run is active, plus a janitor/startup sweep that marks stale started runs failed, or
  • a simpler startup recovery sweep that marks old runs failed with a clear interrupted/abandoned error.

Acceptance criteria

  • A runtime restart after an interrupted run does not leave the UI stuck on Thinking indefinitely.
  • Stale started runs are marked terminal ( or equivalent) with an explanatory / error message.
  • Long-running active runs are not incorrectly failed if heartbeat/lease support is implemented.
  • Add tests covering an abandoned started run recovery path.

Context

Current PR addresses handler exceptions after a run starts by failing the newly-started run in the handler catch path. This issue tracks crash/shutdown recovery where no in-process catch/finally can run.

主要言語
TypeScript
スター
10.4k
フォーク
399
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

electric-sql/electric のほかの issue

electric-sql/electric の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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