Skip to content

docs: harden against diagnosing a healthy seat, and trim 6KB from CLAUDE.md - #1014

Merged
lilyshen0722 merged 3 commits into
mainfrom
docs/harden-silent-seat-and-trim-claudemd
Aug 19, 2026
Merged

lilyshen0722 merged 3 commits into
mainfrom
docs/harden-silent-seat-and-trim-claudemd

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

Net −6KB on CLAUDE.md, despite adding a rule

59.6KB → 53.6KB. That file is loaded into every agent's context on every turn, so its size is a running cost, not a style question.

Removed: the clawdbot pin archaeology (~6KB)

Resolved 2026-08-05 by #840 and now guarded in CI by scripts/verify-moltbot-tool-contract.js. Once a failure has a test, the story of it is history, not instruction. Moved to docs/agents/clawdbot-pin-and-the-cycles-outage.md.

What stays in CLAUDE.md is the operative rule, in two lines: a claim about a tool in another repo needs the ref and something that reads it; re-probe the running container before citing any tool-presence claim.

Added: a silent seat is not evidence of a broken seat

Three lines plus a pointer to docs/runbooks/diagnosing-a-silent-seat.md.

The incident: a seat was declared mute for "19 hours", had five remedies applied — cleared session, fresh process, MCP repointed from npx @latest to a local path, model repinned off claude-fable-5, then repinned back — and was never broken. It had posted seven times inside the window.

The diagnosis rested on grep -c "posted via tool" == 0. That metric cannot detect a seat that posts correctly, because silentReply is evaluated before agentPostedItself (agent.js:988 vs :991), so post-then-sentinel and produced-nothing emit the identical line. The seat itself produced the ledger that falsified it.

The rules that would have prevented it:

  • Check the pod ledger, not the log. When they disagree, the pod is right.
  • The spawn prompt is in argv. ps -ww -o args= shows the full prompt plus --model, --allowedTools, --mcp-config. I asserted this was unreadable from outside the process; that was wrong and cost hours.
  • Diagnose before mutating, one variable at a time. A remedy that appears to work may only have changed which log line is printed — repinning the model "revived" the seat by changing its log output, not its behaviour.

Also scoped: the session-bloat remedy

It was written for gateway/moltbot agents and reads as general advice. Now marked gateway-only, because reaching for it on a wrapper seat is exactly the wrong first move — applied to one during this incident, it did nothing.

Why docs/ and not inline

Per the file's own Knowledge-Base Discipline: "CLAUDE.md and every SKILL.md stay slim. They are anchors — they point to deeper material, they do not host it." Both new files land in existing categories (docs/runbooks/, docs/agents/) rather than inventing one.

Related

Written from an incident where the seat was never broken: declared mute for 19
hours, five remedies applied (cleared session, fresh process, MCP repointed,
model repinned, repinned back), and it had posted seven times inside the window.

Every rule is the residue of an hour lost. The governing one: this system's
failure mode and its correct idle behaviour produce the same observable —
nothing — so silence is never by itself evidence of a fault.
Resolved 2026-08-05 by #840 and guarded in CI by
scripts/verify-moltbot-tool-contract.js. Kept because the failure mode is
durable and the guard is young — but it is archaeology, and CLAUDE.md is loaded
into every agent's context on every turn.

The operative rule stays in CLAUDE.md; the 6KB of history lives here.
Net -6KB (59.6KB -> 53.6KB) despite adding a new rule.

REMOVED: the clawdbot submodule-pin archaeology. It is resolved (#840) and
CI-guarded, so it is history rather than instruction — and this file is loaded
into every agent's context on every turn. Moved to
docs/agents/clawdbot-pin-and-the-cycles-outage.md; the operative rule (a tool
claim needs a ref and a reader; re-probe the container) stays, in two lines.

ADDED: a silent seat is not evidence of a broken seat. Check the pod ledger
before the log — grep for 'posted via tool' CANNOT detect a seat that is
posting correctly, because silentReply is evaluated before agentPostedItself.
Read the live spawn with ps -ww -o args=; the prompt and --model/--allowedTools
/--mcp-config are all in argv and the token is not. Diagnose before mutating,
one variable at a time.

Also scopes the session-bloat remedy as gateway/moltbot-only. Reaching for it
on a wrapper seat is the wrong first move; applied to one on 2026-08-18 it did
nothing, because that seat was not broken.

Per the file's own Knowledge-Base Discipline: CLAUDE.md anchors, docs/ hosts.
@lilyshen0722
lilyshen0722 merged commit 5d7f0b0 into main Aug 19, 2026
10 checks passed
@lilyshen0722
lilyshen0722 deleted the docs/harden-silent-seat-and-trim-claudemd branch August 19, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant