OpenCode session with Claude Code stalls on occasion without clear reason
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- typescript
- Ambito
- api, backend, observability
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 1.6k
- Fork
- 131
- Merge medio
- 7h 40m
- PR unite (30g)
- 29
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rivet-dev/agents
-
skills add rivet-dev/skills -s sandbox-agent fails: the skill was removed from rivet-dev/skillsAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
rivet-dev/agents#319 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
rivet-dev/agents#313 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
bug: codex model variants are out of orderForse già presa @c7ozkan l’ha presa 205 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 58/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di rivet-dev/agents
Issue simili
-
priority:high
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
immich-app/immich#32426 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue hacktoberfest help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
libredb/libredb-studio#1756 ·
I maintainer di solito rispondono entro 1 giorno
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno