Problem
Task status line shows → --- but NEVER updates with actual child tool names (e.g., → bash git log). Works in TUI, broken in oclite. Attempted 15+ times to fix.
Root Cause (Definitive)
Two compounding issues:
1. chat() filters events to parent session only
session.ts:60: if (part.sessionID !== sessionID) return
Child session tool events never reach the streaming code path.
2. block.freeze() called when text arrives
index.ts:521: When prose text arrives, block.freeze() is called which:
- Stops animation
- Calls
logUpdate.done() finalizing the output
- Subsequent
setTaskChildTool() calls render() but the block is no longer live
The sequence:
- Task starts →
block.taskStart() → shows → ---
- LLM outputs text →
block.freeze() → block finalized
- Child tool fires → Bus subscription calls
setTaskChildTool() → render creates new output, doesn't update existing task line
- User sees
→ --- forever
TUI Comparison
TUI uses SolidJS reactive store — task components re-render automatically when child data changes. No "freeze" concept.
Fix Options
Option A: Don't freeze block while tasks are running
if (chunk.type === "text" && chunk.content) {
const hasRunningTasks = [...tasks.values()].some(t => t.status === "running")
if (!hasRunningTasks) block.freeze()
// ...
}
Option B: Separate task status rendering from live block
- Keep task status in a separate line that updates independently
- Don't use logUpdate for tasks
Option C: Re-architecture like TUI
- Global reactive event subscription
- Components update independently
Files
src/cli/lite/index.ts — freeze logic, Bus subscription
src/cli/lite/liveblock.ts — freeze(), setTaskChildTool()
src/cli/lite/session.ts:60 — session filtering
Acceptance Criteria
Problem
Task status line shows
→ ---but NEVER updates with actual child tool names (e.g.,→ bash git log). Works in TUI, broken in oclite. Attempted 15+ times to fix.Root Cause (Definitive)
Two compounding issues:
1.
chat()filters events to parent session onlysession.ts:60:if (part.sessionID !== sessionID) returnChild session tool events never reach the streaming code path.
2.
block.freeze()called when text arrivesindex.ts:521: When prose text arrives,block.freeze()is called which:logUpdate.done()finalizing the outputsetTaskChildTool()callsrender()but the block is no longer liveThe sequence:
block.taskStart()→ shows→ ---block.freeze()→ block finalizedsetTaskChildTool()→ render creates new output, doesn't update existing task line→ ---foreverTUI Comparison
TUI uses SolidJS reactive store — task components re-render automatically when child data changes. No "freeze" concept.
Fix Options
Option A: Don't freeze block while tasks are running
Option B: Separate task status rendering from live block
Option C: Re-architecture like TUI
Files
src/cli/lite/index.ts— freeze logic, Bus subscriptionsrc/cli/lite/liveblock.ts— freeze(), setTaskChildTool()src/cli/lite/session.ts:60— session filteringAcceptance Criteria