PicoClaw
PicoClaw can clear the wrong session when dispatch routes a chat to another agent
A PicoClaw operator reports that /clear and automatic compression target the default agent’s store even when dispatch rules route Telegram or Discord to a non-default agent. The real session keeps growing beyond 100% of its token budget while a zero-byte ghost appears elsewhere.
sipeed/picoclaw issue #3301 is the inspected primary source: “[BUG] /clear and session auto-compression don't work in chats routed to non-default agent via dispatch rules.” The two related records below were inspected as supporting context, not treated as independent confirmation.
The facts
- sipeed/picoclaw issue #3301 was created 2026-07-29T18:37:42Z and was open at inspection; its title is “[BUG] /clear and session auto-compression don't work in chats routed to non-default agent via dispatch rules.” - sipeed/picoclaw issue #3300 was created 2026-07-28T02:45:09Z and was closed at inspection; its title is “[Bug] 工具集缺失 read_file 导致每次对话死锁.” - sipeed/picoclaw PR #3283 was created 2026-07-22T04:43:34Z and was open at inspection; its title is “fix(dingtalk): support picture/image message inbound.” - The repository reported 29775 stars, 56 open issues, default branch main, and last push 2026-07-23T18:29:33Z. - The latest tagged-release baseline checked was nightly published 2026-07-02T01:26:53Z.
What changed
sipeed/picoclaw issue #3301 reports: Quick Summary Environment & Tools **PicoClaw Version:** 0.3.1 (2cf030d2) **Go Version:** N/A **AI Model & Provider:** DeepSeek via OpenCode Go **Operating System:** Raspberry PI **Channels:** Discord, Telegram Steps to Reproduce 1. Config with dispatch rules routing a chat to a non-default agent: 2. Send a few messages to telegram group 3. Run /context command in the chat 4. Run /clear command in the chat 5. Run /context command in the chat 6. Keep sending messages to trigger auto compression/summarization Actual Behavior The /clear command succeeds, but /context shows
sipeed/picoclaw issue #3300 reports: 背景 用户希望将规则/提示词拆分到独立的 RULES.md 文件中独立维护。但系统上下文(system prompt)只能通过 AGENT.md 等固定文件名注入,无法自动读取 RULES.md。 环境 操作系统:Linux amd64 Go 版本:go1.26.5 采用的解决方案 在 AGENT.md 中添加强制性指令铁律: 在回答任何问题或执行任何操作之前,必须使用 read_file 工具读取 RULES.md。 期望让 AI 每次对话先读 RULES.md 拿到额外规则,再正常工作。 注意**:这个有BUG的提示词,是通过 PicoClaw 对话过程中,通过大模型生成的,我也不知道 read_file 不在可用工具集中。 出现的 BUG read_file 工具不存在于 PicoClaw 实例的可用工具集中。 可用工具(共 10 个): append_file、edit_file、list_dir、load_image、reaction、send_file、spawn、subagent、web_fetch、write_file 缺少:**read_file**、**shell 执行能力**。 subagent 同样没有这些能力。AI 陷入"尝试 read_file → 工具不存在 → 重试 → 再次失败"的死锁。 影响 1. 不是每次对话都出现死机情况,但概率很高。 2. 用户需要反复等待、重试,多次消耗大量时间,机器一度因长时负载死机 3. 对话完全无法正常进行 复现步骤 1. 在 AGENT.md 中加入要求调用 read_file 读取 RULES.md 的强制指令 2. 将 RULES.md 放入工作区 3. 启动 PicoClaw 实例 4. 向它提任意问题,正常聊天,三五轮对话后 → 观察死锁 建议修复方案 有问题及时提示,或者交互对话提示用户解决,一直循环尝试会直接卡死。
sipeed/picoclaw PR #3283 reports: DingTalk 渠道图片消息支持 变更 1. **import 新增**: bytes/encoding/json/io/net/http/os/path/filepath/time, media 2. **struct 加字段**: tokenMu, accessToken, tokenExpires (OpenAPI token 缓存) 3. **onChatBotMessageReceived**: 支持图片消息, 优雅降级 4. **新增方法**: getAccessToken, downloadInboundPicture, keysOf, stringValue 说明 图片消息走 downloadInboundPicture 下载并存入 MediaStore 任意步骤失败优雅降级(返回 nil, nil),不阻塞文字链路 OpenAPI token 缓存 ~2h,提前 120s 过期
Why it matters
Routing a message and routing its lifecycle controls are one contract. If clear, compression and diagnostics resolve a different owner than ordinary turns, the UI can report success while retaining the very state the operator tried to remove. This is an operator boundary: persisted state, execution ownership and visible controls must describe the same event. A workaround that broadens access, deletes state or hides the symptom would trade a visible defect for an unmeasured one.
Current
The primary record was open when captured on 2026-07-30. The release baseline was nightly published 2026-07-02T01:26:53Z. Current repository metadata, pull requests, issues, release records, Google News discovery, Hacker News discovery, Lobsters, Metamesh and the rendered ClawCharts row were checked. ClawCharts selected the subject; it did not prove the claim.
Evidence
The primary URL is https://github.com/sipeed/picoclaw/issues/3301. Supporting records are https://github.com/sipeed/picoclaw/issues/3300 and https://github.com/sipeed/picoclaw/pull/3283. Their source bodies, timestamps and states were captured in the daily evidence bundle. Test counts, reproductions and deployment observations remain attributed to their authors unless explicitly 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. Issue closure would not by itself prove a deployed fix. Search residue, package mirrors and historically published source spines were excluded.
Operator take
Resolve session ownership from the same dispatch scope for messages, controls and compaction; test two agents with identical session keys and verify only the intended store changes. Preserve a before-state receipt, make the smallest reversible change, and verify the original failure independently after intervention.
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.