coderClaw

Streaming + chunking

CoderClaw has two separate β€œstreaming” layers:

There is no true token-delta streaming to channel messages today. Telegram preview streaming is the only partial-stream surface.

Block streaming (channel messages)

Block streaming sends assistant output in coarse chunks as it becomes available.

Model output
  └─ text_delta/events
       β”œβ”€ (blockStreamingBreak=text_end)
       β”‚    └─ chunker emits blocks as buffer grows
       └─ (blockStreamingBreak=message_end)
            └─ chunker flushes at message_end
                   └─ channel send (block replies)

Legend:

Controls:

Boundary semantics:

message_end still uses the chunker if the buffered text exceeds maxChars, so it can emit multiple chunks at the end.

Chunking algorithm (low/high bounds)

Block chunking is implemented by EmbeddedBlockChunker:

maxChars is clamped to the channel textChunkLimit, so you can’t exceed per-channel caps.

Coalescing (merge streamed blocks)

When block streaming is enabled, CoderClaw can merge consecutive block chunks before sending them out. This reduces β€œsingle-line spam” while still providing progressive output.

Human-like pacing between blocks

When block streaming is enabled, you can add a randomized pause between block replies (after the first block). This makes multi-bubble responses feel more natural.

β€œStream chunks or everything”

This maps to:

Channel note: For non-Telegram channels, block streaming is off unless *.blockStreaming is explicitly set to true. Telegram can stream a live preview (channels.telegram.streamMode) without block replies.

Config location reminder: the blockStreaming* defaults live under agents.defaults, not the root config.

Telegram preview streaming (token-ish)

Telegram is the only channel with live preview streaming:

Telegram
  └─ sendMessage (temporary preview message)
       β”œβ”€ streamMode=partial β†’ edit latest text
       └─ streamMode=block   β†’ chunker + edit updates
  └─ final text-only reply β†’ final edit on same message
  └─ fallback: cleanup preview + normal final delivery (media/complex)

Legend: