OpenCode session with Claude Code stalls on occasion without clear reason
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- api, backend, observability
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Claude Code requested permission to run
cargo test --test sessions(5-minute timeout) - The daemon auto-approved it (synthetic
permission.resolved, 0.4ms after request) - The test binary was actively running (PID 1277960, 14-18% CPU)
- 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
- Emit periodic heartbeat/status events during long-running Bash commands (e.g.,
item.deltawith a status content part like "Running: cargo test --test sessions (elapsed: 30s)") - Surface Bash command start as a visible event so the UI can show "Executing command..." instead of appearing frozen
- 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
- Ngôn ngữ chính
- TypeScript
- Star
- 1.6k
- Fork
- 134
- Merge trung bình
- 12 giờ 54 phút
- Pull request đã merge (30 ngày)
- 41
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rivet-dev/agents
-
skills add rivet-dev/skills -s sandbox-agent fails: the skill was removed from rivet-dev/skillsĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
rivet-dev/agents#319 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
High-level SDK cannot authenticate current ACP adapters with dynamic auth methodsCó thể đã có người làm @gauravch-code đã nhận 10 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
rivet-dev/agents#313 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: codex model variants are out of orderCó thể đã có người làm @c7ozkan đã nhận 220 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 58/100
rivet-dev/agents#145 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rivet-dev/agents
Issue tương tự
-
e2e-failure ready-to-code
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
redhat-developer/rhdh-plugin-export-overlays#4616 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-handle
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nextlevelbuilder/dewee-web-v2#73 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
PoCInnovation/Distribox#255 ·
Maintainer thường phản hồi trong vòng 1 ngày