Description
During an extended interactive coding session (red-blue adversarial review with large file writes ~300 lines), two distinct stalls occurred where the agent appeared frozen with no user-visible output:
Stall 1: plan → build mode transition
- The session was in
plan (read-only) mode reviewing a 353-line markdown file
- User prompted to continue → system transitioned from
plan → build mode
- Agent entered an internal reasoning block (
<thinking>) but output zero visible content for an extended period
- The TUI showed no indication that processing was ongoing — appeared completely frozen
- User had to prompt "??????" twice to get a response
Stall 2: Long thinking block with no streaming
- Agent was verifying claims against source code (multiple parallel tool calls)
- After tool results returned, agent entered a long reasoning block synthesizing ~9 complex findings
- Again, zero visible output — TUI appeared hung
- User eventually got a response after the thinking block completed
Environment
- OS: Linux
- Shell: bash
- Model: deepseek-v4-pro (via API, thinking mode enabled)
- TUI mode: terminal CLI
Likely causes
-
Thinking blocks produce no streaming output — When the model enters an extended <thinking> phase (30+ seconds), the TUI shows no progress indicator, spinner, or "thinking…" message. Users cannot distinguish between "model is thinking" and "process is hung."
-
Mode transitions may drop the render loop — The plan → build transition involved a system reminder injection mid-response, which appeared to coincide with the stall.
-
Related to existing issues: This may overlap with:
Suggested fix
- Show a visible "thinking…" indicator during reasoning blocks longer than 5 seconds
- Add a recovery timeout — if no streaming tokens for >60 seconds, surface a warning to user
- Ensure mode transitions (plan↔build) don't interrupt the render loop
Session details
- Task: Blue team defense responding to red team prompt audit (9 vulnerabilities, 2 rounds, ~600 lines of analysis)
- Files created:
docs/blue-team-prompt-round1.md (~280 lines), docs/blue-team-prompt-round2.md (~350 lines)
- Total tool calls: ~20 across both rounds
- Both stalls occurred at synthesis/thinking phases, not during tool execution
Description
During an extended interactive coding session (red-blue adversarial review with large file writes ~300 lines), two distinct stalls occurred where the agent appeared frozen with no user-visible output:
Stall 1: plan → build mode transition
plan(read-only) mode reviewing a 353-line markdown fileplan→buildmode<thinking>) but output zero visible content for an extended periodStall 2: Long thinking block with no streaming
Environment
Likely causes
Thinking blocks produce no streaming output — When the model enters an extended
<thinking>phase (30+ seconds), the TUI shows no progress indicator, spinner, or "thinking…" message. Users cannot distinguish between "model is thinking" and "process is hung."Mode transitions may drop the render loop — The
plan → buildtransition involved a system reminder injection mid-response, which appeared to coincide with the stall.Related to existing issues: This may overlap with:
opencode runhangs after completing tool calls — process never exits #17516 (opencode run hangs after completing tool calls)Suggested fix
Session details
docs/blue-team-prompt-round1.md(~280 lines),docs/blue-team-prompt-round2.md(~350 lines)