- Extract src/lib/agent/ bounded context with types, registry, messaging - Add comments_count to BeadIssue for SSE comment detection - Create batch endpoints for mail/reservations APIs - Add memory validation to session-preflight - Remove unused empty dirs (mockup, sessions, timeline) - Move stashes to docs/references, gitignore them
3.5 KiB
3.5 KiB
Failure Modes
This document tracks high-impact coordination and environment failures for the BeadBoard driver skill.
BD_NOT_FOUND
- Signal: preflight or scripts fail with
BD_NOT_FOUND. - Cause:
bdis not installed or not onPATH. - Recovery:
- Install beads CLI.
- Re-open shell so
PATHupdates apply. - Re-run
node skills/beadboard-driver/scripts/session-preflight.mjs.
BB_NOT_FOUND
- Signal:
session-preflight.mjsorbb-mail-shim.mjsreports bb command missing. - Cause: global BeadBoard CLI not installed, or not discoverable.
- Recovery:
- Install BeadBoard globally (
bb/beadboardonPATH) — see Bootstrap Step C in SKILL.md. - Run
node {baseDir}/scripts/setup-mail-delegate.mjsto reconfigure the mail delegate afterbbis installed. - Re-run preflight:
node {baseDir}/scripts/session-preflight.mjs.
- Install BeadBoard globally (
MAIL_DELEGATE_MISSING / BD_MAIL_DELEGATE_NOT_SET
- Signal:
bd mail ...returns delegate-not-configured or shim not invoked. - Cause: neither env delegate (
BEADS_MAIL_DELEGATE/BD_MAIL_DELEGATE) normail.delegateconfig is set. - Recovery:
bd config set mail.delegate "node <abs-path>/skills/beadboard-driver/scripts/bb-mail-shim.mjs"export BB_AGENT=<agent-id>node skills/beadboard-driver/scripts/ensure-bb-mail-configured.mjs
BB_MAIL_NOT_CONFIGURED
- Signal:
ensure-bb-mail-configured.mjsfails contract checks. - Cause: delegate points to wrong command, missing shim path, or invalid
BB_AGENTcontext. - Recovery (in order):
- Check delegate is set:
bd config get mail.delegate - Verify shim path: the path shown must be absolute and the
bb-mail-shim.mjsfile must exist on disk - Reconfigure if wrong/missing:
node {baseDir}/scripts/setup-mail-delegate.mjs - Verify
BB_AGENTis set:echo $BB_AGENT(must be non-empty) - Re-run verification:
node {baseDir}/scripts/ensure-bb-mail-configured.mjs— expected:ok: true
- Check delegate is set:
DOLT_NOT_RUNNING
- Signal:
bdreads stale/fallback data, API routes return Dolt connection failures, or status checks report backend unavailable. - Cause: Dolt SQL server not started for this workspace.
- Recovery:
- From repo root:
bd dolt start - Verify backend health before proceeding (
beadboard status --jsonor project-specific health checks).
- From repo root:
AGENT_HEARTBEAT_MISSED (Witness liveness degradation)
- Signal: agent appears stale/dead in liveness surfaces after inactivity window.
- Cause: agent is not sending
bd agent heartbeat <agent-bead-id>during active work. - Recovery:
- Resume periodic heartbeat (typically every 30-120 seconds while active).
- Set explicit state transitions:
running->working->stuck|done|stopped. - If work was interrupted, post a coordination note/message before resuming.
Mail Lifecycle Errors
UNKNOWN_SENDER/UNKNOWN_RECIPIENT: register agent identities before sending.MESSAGE_NOT_FOUND: incorrect message id or wrong inbox context.ACK_FORBIDDEN: only the message recipient can acknowledge.
Local Workspace Repair Signals
GIT_INDEX_LOCK_PRESENT: stale git lock blocks writes.- Recovery:
- Confirm no active git process is still using the repo.
- Run
node skills/beadboard-driver/scripts/heal-common-issues.mjs --project-root <repo> --apply --fix-git-index-lock.
Policy Guardrails
- Do not write
.beads/issues.jsonldirectly. - Do not close beads without fresh evidence.
- Do not bypass a misconfigured mail delegate; fix configuration with
{baseDir}/scripts/setup-mail-delegate.mjsfirst.