* fix(announce): report unknown token usage instead of zero on the stats line buildCompactAnnounceStatsLine collapsed "token data absent" into "token data is zero". Both states rendered as `tokens 0 (in 0 / out 0)`, so a child whose usage had not been flushed to its session entry announced as though it had done no work. In the openclaw-kkv1 incident the line `runtime 1h30m • tokens 0 (in 0 / out 0)` was part of what made a still-running child look dead; kkv1 fixed the surrounding status/result wording and deliberately left the stats line alone. This is that leftover. There are three states, not two: usage absent (no inputTokens, no outputTokens, and no fresh session total), usage present and genuinely zero (a child that never made a model call), and usage present and non-zero. The fix is not to swap the zero default — `tokens 0 (in 0 / out 0)` is truthful in the second state and must be preserved. Instead, the same predicate the builder already uses inside its token-wait retry loop is hoisted into `hasTokenUsageData` and re-evaluated after the loop; only the absent case renders `tokens unknown`, with no `(in … / out …)` sub-clause. Rendering an explicit `tokens unknown` rather than omitting the clause is deliberate: the incident was about a misleading signal, and a bare `Stats: runtime 1h30m` reads as truncated output instead of conveying "we waited for usage and it never arrived". The sibling formatter `formatTokenUsageDisplay` omits its clause instead, but its `total <= 0` predicate also swallows genuine zeros — the very conflation being fixed here — so its predicate was not copied. The `Stats:` prefix, the ` • ` separator, and part ordering are unchanged; the `prompt/cache` clause is untouched (in the absent state its source is `undefined` by definition, so its existing gate already declines). Only caller is subagent-announce.ts:507. Validation from the topic worktree: pnpm tsgo:core clean; pnpm tsgo:core:test clean (exit 0); pnpm vitest run on subagent-announce-output.test.ts, subagent-announce.format.e2e.test.ts, and shared/subagents-format.test.ts — 3 files, 102 tests passed, including new coverage for both the absent-data case and the present-and-zero case; pnpm config:schema:check ok; pnpm oxlint on both touched files clean; git diff --check clean. Beads: openclaw-syn1 * fix(announce): drop changelog edit and add real-store announce proof (review feedback) Round 1 ClawSweeper review on #126976 blocked this PR on two things: a contributor changelog edit, and the absence of behavior proof through the real announce delivery path. CONTRIBUTING.md:55 assigns CHANGELOG.md edits to maintainers or ClawSweeper, so the entry this branch added is removed. CHANGELOG.md is now byte-identical to origin/main; the release-note substance moves into the PR body. The proof gap was the substantive item, asked twice (checklist items 1 and 3). The pre-existing coverage stubbed readSubagentSessionEntry outright, so it never exercised the seam this fix actually operates on: "the child's persisted session entry carries no usage yet". Two e2e cases now drive the real runSubagentAnnounceFlow against a real on-disk agent session store. The child entry is created with the real writer (patchSessionEntryCore) and read back by the real reader -- readSubagentSessionEntry is deliberately left un-stubbed -- so the Stats: clause in the parent-facing announcement is produced by the production read path rather than by a fixture. The absent case renders `tokens unknown`; the genuine-zero case still renders `tokens 0 (in 0 / out 0)`, which is the discrimination this fix claims. No production code changed in this commit. Validation from the topic worktree: pnpm tsgo:core exit 0; pnpm tsgo:core:test exit 0; pnpm vitest run subagent-announce-output.test.ts -- 2 files, 96 tests passed; full subagent-announce.format.e2e.test.ts -- 86 tests passed (84 pre-existing plus the 2 added); pnpm check:import-cycles -- 0 runtime value cycles; pnpm config:schema:check ok; pnpm plugin-sdk:surface:check exit 0; pnpm oxlint on both touched files exit 0; git diff --check clean. Beads: openclaw-syn1 * fix(announce): compress stats-line prose (review feedback) ClawSweeper round 2 flagged the production diff as growing by 15 lines for a small bug fix and asked for the redundant explanatory prose to be compressed where practical. This commit is prose only — no behavior change. What changed: - `hasTokenUsageData` keeps its shared predicate (the review calls it justified) but drops the 6-line JSDoc block for a single-line comment. No other helper in this file carries a JSDoc block, so the block was the outlier, not the idiom. - The post-wait-loop comment collapses from two lines to one. The state-1 (usage absent) / state-2 (usage genuinely zero) discrimination is untouched, as is every call site. Production net drops from +15 to +9 lines. Validation: tsgo:core, tsgo:core:test, unit, e2e, import-cycles, config:schema:check, plugin-sdk:surface:check, oxlint, git diff --check. Beads: bighat-nsgi --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
OpenClaw 🦞 — Your assistant, on your devices, in your chats
OpenClaw is a personal AI assistant that runs on your devices and meets you in the channels you already use. It is designed for a single operator and connects models, tools, messaging channels, and optional companion apps through one Gateway.
Website · Docs · Getting started · Showcase · FAQ · Vision · DeepWiki
Install
The installer supports macOS, Linux, and Windows. It provisions a supported Node.js runtime when needed.
# macOS / Linux / WSL2
curl -fsSL https://openclaw.ai/install.sh | bash
# Windows PowerShell
iwr -useb https://openclaw.ai/install.ps1 | iex
Already manage Node.js? Install the published package instead (Node 22.22.3+, 24.15+, or 25.9+):
npm install -g openclaw@latest --allow-scripts=openclaw
That command is for npm 12 or npm 11.16+. On npm 11.15 and earlier, omit
--allow-scripts=openclaw. See the
installation guide for the lifecycle script
contract, Docker, Nix, and other deployment paths.
Quick start
On a fresh install, the installer scripts start onboarding automatically. Complete the wizard they open. If you installed the package directly with npm, pnpm, or Bun, run:
openclaw onboard --install-daemon
After onboarding:
openclaw gateway status
openclaw dashboard
Onboarding verifies model access, creates the workspace, and configures the Gateway. The last command opens the Control UI; send a message there to confirm the assistant is working. See the getting started guide for channel setup and troubleshooting.
How it fits together
- The Gateway is the local control plane for sessions, tools, events, and channel connections.
- The Control UI, CLI, and TUI connect to the Gateway.
- Channels bring the assistant to WhatsApp, Telegram, Slack, Discord, Google Chat, Signal, iMessage, and other messaging services.
- Companion apps and nodes add voice, Canvas, camera, screen, and device-local actions on supported platforms.
OpenClaw works with hosted and local model providers. Its tools, skills, and plugins extend what an assistant can do.
Security
Treat inbound messages as untrusted input. DM-capable channels pair unknown senders by default; approve a pairing request with openclaw pairing approve <channel> <code>.
Tools run on the host for the main session unless you configure sandboxing. Read the security guide, exposure runbook, and sandboxing guide before connecting other users or exposing the Gateway remotely.
Documentation
| Goal | Start here |
|---|---|
| Configure models and auth | Models · Model providers |
| Connect a messaging service | Channels |
| Add tools, skills, and plugins | Tools · Skills · Plugins · ClawHub |
| Run apps and device nodes | Platforms · Nodes |
| Use the CLI and chat commands | CLI reference · Slash commands |
| Configure or operate the Gateway | Configuration · Architecture · Updating · Release channels |
Development
The repository is a pnpm workspace. Plain npm install at the repository root is not supported.
git clone https://github.com/openclaw/openclaw.git
cd openclaw
pnpm install
pnpm build
pnpm ui:build
See CONTRIBUTING.md for the contribution workflow and the source setup guide for the development loop.
Community
OpenClaw is developed in the open by the OpenClaw Foundation, a non-profit. See CONTRIBUTING.md for maintainers and contribution guidelines; AI-assisted PRs are welcome.
Use the issue chooser for bugs and feature requests, ask setup questions in Discord, and report vulnerabilities through SECURITY.md. New capabilities usually belong in plugins built on the plugin SDK and shared through ClawHub.
OpenClaw was built for Molty, a space lobster AI assistant, by Peter Steinberger and the community. Explore the project lore, soul.md, Peter's site, Star History, and @openclaw.
Special thanks to Mario Zechner for his support and for pi, and to Adam Doppelt for the lobster.bot domain.
Sponsors
Contributors
Thanks to all clawtributors:
License
MIT © OpenClaw Foundation. See THIRD_PARTY_NOTICES.md for incorporated or adapted code.