Releases: Producible/CereWorker
Releases · Producible/CereWorker
v26.330.3
v26.330.3
Cerebellum Recovery Guidance
- New
AssessTurnRecoverygRPC RPC — the Cerebellum receives full recovery context (progress ledger, checkpoints, browser state, partial content) and returnswait,retry, orstopwith a tailoredmodelMessagefor the Cerebrum - Repetition detection: if the last 6 tool actions repeat the same 1-2 patterns, the Cerebellum returns
stopto prevent infinite retry loops waitaction for first-time stalls under 90s inwaiting_modelphase — avoids false nudges when the model is thinkingstopaction for repetitive completion retries — aborts early instead of exhausting the retry budget- Fallback to local TypeScript logic if the Cerebellum is offline or the gRPC call fails
Recovery Architecture
- Both stall and completion retries now go through
assessTurnRecovery() - The Cerebellum's
modelMessagereplaces the hardcoded resume context operatorMessageshown to the user,diagnosisandnextSteploggedstreamDeferredUntilpauses the watchdog when the Cerebellum sayswait
Docker Image
The Cerebellum Docker image needs a rebuild to include the new AssessTurnRecovery handler. Run bash scripts/publish-cerebellum.sh to push the updated image.
v26.330.2
v26.330.2
Browser Progress Ledger
- Structured progress tracking across retry attempts — each tool result records action, summary, URL, tab, and state-changing flag
- Progress entries survive retries via
TurnContinuityState, giving the retry context a detailed record of what was already accomplished - Read-only tools (
browserGetText,readFile, etc.) are automatically classified as non-state-changing - Ledger capped at 20 entries with smart eviction (read-only entries evicted first)
Task Checkpoints
- New
task_checkpointinternal tool — Cerebrum marks milestones ("profile continuity checked", "engagement pass done") with evidence - Checkpoints are upserted by step name and included in retry resume context
- Checkpoints are preserved across retries — the model sees a structured list of what's already been verified
Browser State Tracking
BrowserStateSnapshottracks current URL, active tab, and tab list- Updated from
result.metadata.resumeon each browser tool execution - Included in retry context: "Current URL: https://x.com/home", "Active tab: 134851321"
Structured Browser Tool Results
- All browser tools now return
ToolExecutionValuewithmetadata.resumecontaining action summaries - Enables the progress ledger to record rich context without parsing output strings
Unified Resume Context
- Single
buildRetryContextMessage()handles both stall and completion retries - Resume context includes: browser state, checkpoints, progress ledger entries ([done]/[seen]/[error]), partial text
v26.330.1
v26.330.1
Retry Message Cleanup
- Failed attempt tool/system messages are excluded from retry prompts using ID-based filtering (not positional cutoff)
- Failed attempt messages are deleted from the conversation store on ALL exit paths: success, exhaustion, error, and Cerebellum disconnect
- Successful retry's own tool results are preserved in the conversation store
- Stable message ordering via
ORDER BY timestamp, rowid
Resume Context (No Repeat)
- Retried turns see only: user message + transient resume summary + nudge
- Failed attempt's raw tool call history is excluded — model cannot "follow the template" and repeat steps
- Resume prompt explicitly states: "tool call history has been removed, do NOT repeat these steps"
Task Completion Guard
task_complete/task_blockedinternal tools for structured turn endings- Completion guard retries independently from stall retries (separate budgets)
- Completion retry context includes tool summaries and partial text
Stream Finish Metadata
- Provider captures finishReason, stepFinishReasons, chunkCount, toolCallCount, stepCount
- Completion guard uses this to detect turns ending on tool-calls without final answer
v26.329.28
v26.329.28
Completion Retry Context
- Completion retries now include transient resume context (recent tool results, partial text, finish reason)
- Matches the stall retry context pattern — injected into retry attempt, NOT persisted to conversation
Non-Debug TUI
- Default view shows only message content (user=blue, cerebrum=green) without role labels or tool outputs
--debugflag restores the full verbose view with role labels, tool details, and streaming header- Cleaner experience for normal users
Event-Driven Stall Detection
- Removed 250ms polling interval for stall state
- TUI now updates stall indicator purely from events (cerebrum:stall, watchdog, tool:end, etc.)
Presentation Utilities
formatLocalTimestamp()— timezone-aware formatting via Intl.DateTimeFormatfilterTranscriptMessages()— filters to user+cerebrum for non-debug display
v26.329.27
v26.329.27
Stall Retry Continuity
- Retried turns now receive a transient resume context with recent tool results and partial text from the interrupted attempt
- Prevents retried turns from restarting from scratch — instructs the model to resume from the most advanced confirmed state
- Resume context is NOT persisted to conversation history (transient injection only)
Adaptive Stall Threshold
waiting_modelphase uses 3x base threshold (models legitimately take longer to think)- Each retry adds 1x base threshold (linear backoff)
waiting_toolphase keeps the original threshold (tools should complete promptly)- Reduces false-positive nudges during genuine model reasoning
v26.329.26
v26.329.26
Task Completion Guard
- Internal
task_completeandtask_blockedtools — Cerebrum must call one before ending a tool-driven turn - If the turn ends without a completion signal, the orchestrator retries with a prompt to continue
- Internal tools are hidden from conversation history and TUI
Split Retry Accounting
- Stall retries (
maxNudgeRetries) and completion retries (maxCompletionRetries) now have independent budgets - Total max attempts = 1 + stall retries + completion retries (default 5)
- Each retry tracks its cause (
stallorcompletion) for clear diagnostics - Safety limit prevents infinite loops
Stream Finish Metadata
- Provider captures
finishReason,rawFinishReason,stepFinishReasons,chunkCount,textChars,toolCallCount,stepCount - Completion guard uses this to detect turns that ended on
tool-callswithout a final answer
v26.329.25
v26.329.25
- Watchdog diagnostics in TUI — shows stage/message trace (stalled, nudge_requested, abort_issued, retry_started, retry_recovered, retry_failed, teardown_timeout)
- Abort teardown fallback for stuck iterators
- Stream diagnostic events with phase context
v26.329.24
v26.329.24
Consolidates watchdog recovery fixes and shared abort helpers:
- Watchdog recovery for stuck tool calls — abort signal propagates through provider → tool-runtime → browser backend. Stuck browser operations (navigate, getPageText, etc.) are now interrupted by the watchdog.
- Stream phase diagnostics —
StreamPhase(idle/waiting_model/waiting_tool) with active tool name in stall events - Shared abort helpers —
raceWithAbort,throwIfAborted,createAbortErrorextracted to@cereworker/core(no more duplication) - Iterator teardown —
iterator.return()called on abort to stop background tool execution - AbortSignal threading — wired through orchestrator → tool-runtime → browser tools → extension relay
v26.329.22
v26.329.22
Republish of v26.329.21 — the gateway package tarball was missing on npm CDN due to a partial publish failure. All packages verified and installable.
Includes all stream watchdog end-to-end fixes:
- gRPC 5s deadline on verifyToolResult
- Cerebellum-gated nudge with error/null fallback
- Cerebellum required: sendMessage blocks when offline
- Mid-stream disconnect aborts cleanly
- Provider abort race with iterator.return() teardown
- Single abort listener (no per-part leak)
- Duplicate error suppression + discovery error surfacing
- Stream phase tracking (idle/waiting_model/waiting_tool)
- Abort signal wired through sub-agent manager
v26.329.21
Stream Watchdog End-to-End Fix
This release consolidates all stream watchdog fixes from v26.329.17–v26.329.21 into a working end-to-end stall recovery system.
What was broken
The Cerebrum would silently stop mid-response during complex browser automation workflows. The watchdog detected the stall but couldn't recover because:
- gRPC calls to the Cerebellum hung forever (no deadline)
- The AI SDK's async iterator didn't break on abort during multi-step tool execution
- Error events were duplicated or swallowed
What's fixed
- gRPC 5s deadline on
verifyToolResult— prevents hung Cerebellum calls - Cerebellum authority — nudge decision goes through Cerebellum; errors/timeouts trigger nudge as fallback
- Cerebellum required —
sendMessageblocks when Cerebellum is offline - Mid-stream disconnect — aborts the stream cleanly with clear error message
- Provider abort race —
Promise.racewithiterator.return()teardown ensures the abort actually breaks the stream and stops background tool execution - Single abort listener — no per-part listener leak on long streams
- TUI error surfacing — offline errors show in chat UI for both normal messages and first-run discovery
- Duplicate error suppression — intentional aborts (nudge + disconnect) only emit one error