PicoClaw

PicoClaw puts failure and timeout semantics into delegated tools

PicoClaw proposes returning MCP failures to the agent loop instead of hanging it, honoring execution timeout and boolean run options, and allowing delegated tools to request a model override. The cluster makes delegation controls observable at the call boundary.

← Back to homeOriginal source ↗

sipeed/picoclaw PR #3337 is the inspected primary source: “Fix/mcp failure hangs agent loop.” The related records below were inspected as supporting context rather than independent confirmation.

The facts

- sipeed/picoclaw PR #3337 was created 2026-08-14T19:06:35Z and was open at inspection; its title is “Fix/mcp failure hangs agent loop.” - sipeed/picoclaw PR #3319 was created 2026-08-07T03:20:58Z and was open at inspection; its title is “fix(tools): honor exec timeout and boolean run options.” - sipeed/picoclaw issue #3330 was created 2026-08-13T02:21:30Z and was open at inspection; its title is “[Feature] Support dynamic model override in delegate/spawn/subagent tools.” - The repository reported 29856 stars, 49 open issues, default branch main, and last push 2026-08-14T18:19:48Z. - The latest tagged-release baseline checked was nightly published 2026-07-02T01:26:53Z.

What changed

sipeed/picoclaw PR #3337 reports: Description Fixes a hang in the agent loop when an MCP server connection fails. Previously, if ensureMCPInitialized returned an error (e.g. an unreachable/broken MCP server), AgentLoop.Run propagated the error and exited, so the chat interface stopped replying to users entirely until a restart. This PR makes MCP initialization failure **non-fatal**: the error is logged as a warning and the agent keeps running without MCP tools. The change is applied to every entry point that treated MCP failure as fatal: Run — keeps the agent loop alive and still processes inbound messages (pkg/agent/agent.go). Continue — no longer drops the claimed session, so queued steering messages are still processed (pkg/agent/steering.go). ProcessDirectWithChannel / ProcessHeartbeat — direct and cron/heartbeat calls continue without MCP tools (pkg/agent/agent_message.go). Hooks initialization remains fatal in the direct/heartbeat paths (unchanged behavior), but is also downgraded to a warning inside Run/Continue, since killing the whole loop there would cause the same hang class. A regression test (TestAgentLoopRun_DoesNotExitOnMCPInitFailure) verifies that with a broken MCP server the loop stays alive, replies to inbound messages, and exits cleanly on context cancel. Type of Change [x] Bug fix (non-breaking change which fixes an issue) AI Code Generation [x] Fully AI-generated (100% AI, 0% Human) Related Issue Fixes #3269

sipeed/picoclaw PR #3319 reports: Description The exec tool promote a per-run timeout argument, but synchronous execution always used the configured global timeout and silently ignored the supplied value. The tool schema also declared background and pty as strings even though they are boolean options and the executor accepts boolean values. This PR: honors an explicitly supplied per-run timeout, including values longer or shorter than the configured default; rejects negative or overflowing timeout values; declares background and pty as JSON booleans; tells the model to use background sessions with poll/read instead of synchronous sleeps after a timeout; adds regression tests for the schema and both timeout override directions. This is a focused follow-up to #2161, limited to the exec option contract. It also relates to the fixed global-timeout report in #1025. Type of Change [x] Bug fix (non-breaking change which fixes an issue) [ ] New feature (non-breaking change which adds functionality) [ ] Documentation update [ ] Code refactoring (no functional changes, no api changes) AI Code Generation [x] Fully AI-generated (100% AI, 0% Human) [ ] Mostly AI-generated (AI draft, Human verified/modified) [ ] Mostly Human-written (Human lead, AI assisted or none) Related Issue Related to #1025 Focused follow-up to #2161

sipeed/picoclaw issue #3330 reports: Summary The delegate, spawn, and subagent tools currently do not support specifying a model at call time. The model is always determined statically: **delegate**: Uses the target agent's configured model (from config.json) **spawn**: Uses the main agent's defaultModel **subagent**: Uses the main agent's defaultModel This limits flexibility when a user wants to use a different model for a specific task without changing global configuration. Current Behavior The tool parameter schemas expose no model field: | Tool | Parameters | Model Source | |------|-----------|-------------| | delegate | agent_id, task | Target agent's configured model | | spawn | task, label, agent_id, direct_reply | defaultModel (static) | | subagent | task, label | defaultModel (static) | Proposed Change Add an optional model parameter to all three tools. When provided, it overrides the default/target agent's model for that single invocation. Key findings from source code review The underlying SubTurnConfig struct **already has** a Model field: However, the tools don't expose this in their Parameters() schema, so the model can only be set statically via config.json. Suggested implementation 1. Add model to tool parameter schemas:** 2. Read and pass model in Execute():** For delegate (pkg/tools/delegate.go): For spawn (pkg/tools/spawn.go) and subagent (pkg/tools/subagent.go), similar changes — read model from args and pass it to SubTurnConfig.Model, falling

Why it matters

Delegation multiplies failure paths. A hung MCP call, ignored timeout or hidden model choice can make a child task impossible to bound or explain from the parent run. The operator test is whether the system remains bounded and its receipts still describe the action after failure, retry or restart.

Current

The primary record was open when captured on 2026-08-15. The tagged-release baseline was nightly published 2026-07-02T01:26:53Z. Repository metadata, full source bodies, current pull requests and issues, releases, Google News, Hacker News, Lobsters, Metamesh and the rendered ClawCharts row were inspected. ClawCharts selected the subject; it did not prove the claim.

Evidence

The primary URL is https://github.com/sipeed/picoclaw/pull/3337. Supporting records are https://github.com/sipeed/picoclaw/pull/3319 and https://github.com/sipeed/picoclaw/issues/3330. Source bodies, timestamps and states are preserved in the daily evidence bundle. Test counts and reproductions remain attributed to their authors unless identified as independently rerun.

Source boundary

Open work is described as open, closed work as closed, and operator reports as reports. A pull request is evidence of proposed or reviewed direction, not proof of a shipped release. Search residue, package mirrors and historically published source spines were excluded.

Operator take

Require every delegated call to record model, deadline and terminal status, then test unavailable MCP servers and expired executions without wedging the parent loop. Preserve a before-state receipt, make the smallest reversible change, and verify the original failure independently.

Caveat

Public project records are mutable. Status, scope and evidence can change after publication. This brief records the inspected state and does not authorize changes to a reader’s deployment.

Source inspected; source state, environment and release boundary remain explicit.