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

OpenCode session with Claude Code stalls on occasion without clear reason

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript

調査の方向性

Start by tracing Bash command execution and event emission in the sandbox-agent event stream, using the reported cargo test --test sessions run as a reproduction. Compare the stream while a long-running command executes with the events after it completes. Done means the API exposes enough command-start or progress information for the UI to distinguish active execution from a stalled session.

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

説明

Summary

When using Claude Code through the OpenCode compatibility layer (e.g. via Gigacode), sessions can appear to stall without any clear error or indication of what went wrong. After investigation, the root cause is not an actual stall but a UX gap: no events are emitted during long-running Bash command execution, making the UI appear frozen.

Investigation Findings

What looked like a stall

Session ses_1 appeared frozen in Gigacode. The last visible API event was a permission.resolved for cargo test --test sessions (evt_1247). No new events appeared for ~2.5 minutes.

What was actually happening
  1. Claude Code requested permission to run cargo test --test sessions (5-minute timeout)
  2. The daemon auto-approved it (synthetic permission.resolved, 0.4ms after request)
  3. The test binary was actively running (PID 1277960, 14-18% CPU)
  4. Once tests completed (~2.5 min), events resumed normally (evt_1248+)

The session was never stalled. The Bash command was executing, but sandbox-agent emits no intermediate events during Bash execution — so the UI had no way to show progress.

Transcript vs API event divergence

Comparing the session-ses_1.md transcript (generated from Claude Code's stream-json) with the sandbox-agent events API revealed:

API Events Transcript
Tool calls 181 178
Subagent (inner) calls 117 (flattened inline) 0 (collapsed into Task result)
Ordering All calls including subagent inner calls, flat Top-level calls only

The ordering "mismatch" is because the API flattens subagent tool calls into the main event stream (each Read/Grep/Bash inside a Task appears as its own event with parent_tool_use_id), while the transcript collapses Task subagent activity into a single entry with a summary result.

This is not a bug — they're different views of the same activity. But it can be confusing when debugging.

Root Cause

No events emitted during Bash execution. When Claude Code runs a long command (e.g., cargo test with a 5-minute timeout), the sandbox-agent event stream goes silent until the command completes. There is no heartbeat, progress indicator, or "command still running" status event.

Suggested Improvements

  1. Emit periodic heartbeat/status events during long-running Bash commands (e.g., item.delta with a status content part like "Running: cargo test --test sessions (elapsed: 30s)")
  2. Surface Bash command start as a visible event so the UI can show "Executing command..." instead of appearing frozen
  3. Consider a timeout warning event when a command approaches its timeout limit

Environment

  • Agent: Claude Code (via OpenCode compat layer)
  • Interface: Gigacode
  • Permission mode: default
  • Model: claude-opus-4-6
主要言語
TypeScript
スター
1.6k
フォーク
131
平均マージ
7時間 40分
マージ済み PR(30日)
29

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

rivet-dev/agents のほかの issue

rivet-dev/agents の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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