惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

TaoSecurity Blog
TaoSecurity Blog
L
LINUX DO - 最新话题
Help Net Security
Help Net Security
N
News | PayPal Newsroom
www.infosecurity-magazine.com
www.infosecurity-magazine.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
The Last Watchdog
The Last Watchdog
S
Security @ Cisco Blogs
W
WeLiveSecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
Webroot Blog
Webroot Blog
T
Troy Hunt's Blog
V
Vulnerabilities – Threatpost
Google Online Security Blog
Google Online Security Blog
N
News and Events Feed by Topic
T
Threat Research - Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tor Project blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
D
Darknet – Hacking Tools, Hacker News & Cyber Security
PCI Perspectives
PCI Perspectives
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
S
SegmentFault 最新的问题
J
Java Code Geeks
P
Privacy & Cybersecurity Law Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - 【当耐特】
博客园_首页
H
Hacker News: Front Page
T
Threatpost
Jina AI
Jina AI
博客园 - Franky
月光博客
月光博客
L
LINUX DO - 热门话题
The Cloudflare Blog
H
Heimdal Security Blog
博客园 - 司徒正美
酷 壳 – CoolShell
酷 壳 – CoolShell
Cloudbric
Cloudbric
雷峰网
雷峰网
Hugging Face - Blog
Hugging Face - Blog
S
Secure Thoughts
T
Tenable Blog
I
Intezer
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

Hacker News - Newest: "OpenClaw"

OpenClaw just launched an official app for iPhone, details here - 9to5Mac OpenClaw Launch — Deploy AI Chatbots in Seconds Self-Host OpenClaw AI Agent on VPS: Full Setup Guide GitHub - xltvy/openclaw-memgpt: OpenClaw plugin that gives agents MemGPT-style memory: tiered core/archival/recall storage, self-directed memory operations via tool calls, memory-pressure warnings, and recursive summarisation. Integrates the reference MemGPT implementation via a local sidecar service, preserving the original architecture without reimplementation. Malicious AI 23 ClawHub Plugins Squat Official Org Scopes - Manifold Security what shipping OpenClaw in production taught us — AutoClaw AgentLine — AI Phone API | Phone Numbers, Voice & SMS for AI Agents Make Your OpenClaw Agent Cheaper, and Measure It Yourself GitHub - sammysltd/OpenEmployee: Make your OpenClaw agent employable: deny-by-default governance, budgets, allowlists, approval gates, and a signed audit trail via MakerChecker. Migrate from OpenClaw | Hermes Agent StackOverflow closed my OpenClaw and paperclipAI integration q. as "irrelevant" GitHub - sausin/outpost: Removing AI agents' quiet security problem Potassium — ClawHub Plugins Pi Building Pi, Openclaw's Minimalist Coding Agent | Mario Zechner, Creator of Pi I Spent 4 Hours So You Don’t Have To: Hetzner Metal + NixOS in ~15 Minutes − Irakli's blog GitHub - snuri00/osint-mcp: Self-hosted OSINT toolkit — MCP server, AI REPL, CLI, web app & chat apps (WhatsApp/Telegram/Discord via OpenClaw). Entity, event/news & social/community intelligence. Keyless-first. What a Regex Can't Do GitHub - ai-sns/openclaw-hermes-agent-network: OpenClaw Hermes AI Agent Social Network🦞💬🦞Built on Google 3D Maps and A2A protocol, connects OpenClaw and Hermes agents worldwide in a 3D environment. Phishing for Lobsters: How We Tricked OpenClaw into Spilling Secrets GitHub - CODEANDTRUST/clawcall: Give your OpenClaw / self-hosted AI agent inbound phone calls - a Twilio-to-gateway voice bridge with working agent tools mid-call (MIT). Build a ZeroCost Web Automation Pipeline with OpenRouter, OpenClaw, and MediaUse Let OpenClaw Run Wild in Simulation, Not on Your Customers | Veris AI GitHub - gpdir16/tabyAgent: A lighter, easier alternative to OpenClaw/Hermes. Runs autonomously inside Docker and chats with you through Telegram. Ask HN: What are the biggest problems you find in OpenClaw/Hermes? Microsoft launches Scout, an OpenClaw-inspired personal assistant GitHub - openclaw/openclaw-windows-node: Windows companion suite for OpenClaw - System Tray app, Shared library, Node, and PowerToys Command Palette extension Microsoft unveils Scout, an autonomous AI agent built on OpenClaw Gavriel Cohen found his own code inside OpenClaw, so he walked away GitHub - hunvreus/heypi: Chat agents for your team, with approvals and sandboxed tools. Slack, Discord, Telegram, webhooks. HolaClaw: run OpenClaw securely in Mac Multi-Agent Orchestration System: Hermes (Windows) ↔ OpenClaw (WSL) We were building infra for OpenClaw, and today I just tried Hermes and holy shit GitHub - openclaw/openclaw: Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞 OpenClaw as the Universal Operating System for Agents ARC Prize - Community Leaderboard Setup OpenClaw with Slack: from install to first message twitter.com I Gave My OpenClaw Agent a Physical Body Use Grok in OpenClaw The creator of OpenClaw used $1,300,000+ of OpenAI tokens in 30 days, which is a hell of a perk GitHub - oswarld/openshears: 🔪 THE OPENCLAW TERMINATOR 🦞 Are we human? Show HN: OpenClaw is just not dangerous enough. I needed something else OpenClaw creator burned through $1.3 million in OpenAI API tokens in a single month — bill covered 603 billion tokens across 7.6 million requests and 100 coding agents OpenClaw/Hermes Hosting Comparison GitHub - ExTV/rikkahub-agent: RikkaHub Agent -- is RikkaHub fork that have Full agent mode . For $1.3 million a month, OpenClaw founder Peter Steinberger runs 100 AI agents that code, review PRs, and find bugs Where OpenClaw Security Is Heading OpenAI Models in OpenClaw, Done Right GitHub - thesysdev/openclaw-os: The default workspace for OpenClaw Token, Harness, OpenClaw, RAG, MCP, Agent – What's the Difference? We need a safe alternative to Telegram for agents like OpenClaw or Hermes Two OpenClaw agents negotiate a YC SAFE with Agentic Power of Attorney OpenClaw Had a Rough Week GitHub - LobsterTrap/tank-os GitHub - haishmg/Clawback How OpenClaw Got Safer in Public openclaw ggsql — ClawHub Show HN: iClaw is part OpenClaw, part Siri, powered by Apple Intelligence GitHub - lotsoftick/openclaw_client: OpenClaw web client Show HN: OpenClaw but Efficient and with an SDK GitHub - TheGuyWithoutH/mac-computer-use GitHub - microsoft/openclaw: Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞 The OpenClaw turkey problem OpenClaw: opioids for Chinese AI companies GitHub - supersuit-tech/permission-slip [AINews] The Two Sides of OpenClaw OpenClaw stats don't add up GitHub - brexhq/CrabTrap: An LLM-as-a-judge HTTP proxy to secure agents in production Anthropic - OpenClaw Hustlers are cashing in on China’s OpenClaw AI craze Engineering Managers are going to hate OpenClaw GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw Ask HN: Who is using OpenClaw? Why Meta’s AI Alignment Director Couldn't Stop Her Own Agent—and How to Fix It GitHub - epsilla-cloud/clawtrace: Make your OpenClaw agents better, cheaper, and faster. Ask HN: What are you using OpenClaw or agents for? GitHub - epsilla-cloud/clawtrace: Make your OpenClaw agents better, cheaper, and faster. GitHub - theprint/nfh-self-improvement-loop: Minimal adversarial framework for AI agent self-modification. Inspired by karpathy/autoresearch. GitHub - ibrahimmukherjee-boop/ClearFrame: OpenClaw Alternative with better governance, security Show HN: Agent-Notifications – Real-Time Alerts for OpenClaw and Hermes Agents OpenClaw + Claude are better than therapy GitHub - zeulewan/glueclaw: Use Claude Max subscription with OpenClaw again Anthropic temporarily banned OpenClaw’s creator from accessing Claude OpenClaw’s memory is unreliable, and you don’t know when it will break Give Your OpenClaw Agent a Real Memory You need a Windows Remote Desktop, not an OpenClaw GitHub - cruxdigital-llc/CongaLine: Deploy and manage a fleet of OpenClaw AI assistants anywhere. Supporting hobbyist, team, and enterprise use cases. GitHub - cezarpena/vsm-cell: VSM-Cell is an OpenClaw agent P2P mesh orchestration standalone app. GitHub - joshchoi4881/dropspace-agents GitHub - askalf/dario: Universal LLM router. One local endpoint, every provider — OpenAI, Groq, OpenRouter, Ollama, Claude Max/Pro subscriptions, the Claude Agent SDK, any OpenAI-compat URL. Your tools stop caring which vendor is upstream. Tutorial: Secure OpenClaw with CloudConnexa OpenClaw and the Dream of Free Labour GitHub - RageDotNet/openclaw-webdav GitHub - kevinslin/openai-apps: Support openai apps in openclaw GitHub - aelaguiz/doctrine: Code-like DSL and compiler for agent workflows that compile to portable AGENTS.md instructions. Unlocking cloud inference compute for OpenClaw OpenClaw for Sales: How AI Agents are Revolutionizing Revenue Teams | Kickscale OpenClaw Architecture - Part 1: Control Plane, Sessions, and the Event Loop
Reducing OpenClaw token usage
Bharat Kunwar · 2026-05-17 · via Hacker News - Newest: "OpenClaw"

TL;DR Link to heading

I had reduced my OpenClaw heartbeat cadence a few weeks ago expecting a big drop in LLM credit usage. It barely moved the bill. Digging into the per-call usage logs, I found that every persistent session had compactionCount: 0, so each cron run and group chat reply was replaying its own growing transcript on top of a 12k-character bootstrap. The fixes that helped were elsewhere: a 500 KB compaction trigger, deduplicated overlap between the heartbeat and a daily cron, and a reset of the stale sessions. Together they took my daily token total from ~2.2M to ~256k. Slowing the heartbeat to once a day contributed a small share.

Motivation Link to heading

I had reduced the heartbeat cadence weeks earlier expecting credit usage to fall in proportion. It did not, and the bill kept growing. I had been treating the heartbeat as the dominant cost without checking. The next step was to find out which session was burning the tokens.

What the trajectory files told me Link to heading

The per-event session transcripts at ~/.openclaw/agents/main/sessions/<sid>.jsonl are just the user/assistant message stream. The numbers I needed were one file over: <sid>.trajectory.jsonl. Every model.completed event has a data.usage object with input, cacheRead, output, and total.

import json, glob
from collections import defaultdict

base = "/path/to/agents/main/sessions"
day_key = defaultdict(lambda: defaultdict(lambda: [0, 0, 0, 0]))

for fp in glob.glob(f"{base}/*.trajectory.jsonl"):
    for line in open(fp):
        e = json.loads(line)
        if e.get("type") != "model.completed":
            continue
        u = e.get("data", {}).get("usage") or {}
        d = e.get("ts", "")[:10]
        sk = e.get("sessionKey", "?")
        day_key[d][sk][0] += u.get("input", 0)
        day_key[d][sk][1] += u.get("cacheRead", 0)
        day_key[d][sk][2] += u.get("output", 0)
        day_key[d][sk][3] += 1

Aggregating by sessionKey made the picture clear. The heartbeat was not the biggest spender. Four daily personal-routine crons plus a handful of group chat replies each accounted for more tokens than the heartbeat ticks I had been pruning. Each call at frontier-model pricing averaged about 160k tokens, mostly in the cacheRead column.

Every session was leaking credits Link to heading

I checked compactionCount for every persistent session in agents/main/sessions/sessions.json. All of them sat at 0. They had been alive for days or weeks, accumulating message history, and had never been summarised. By default, OpenClaw triggers compaction only when the prompt nears the model’s token limit. My context window was large enough that this trigger never fired in normal use, so each call replayed the whole growing transcript.

The schema for agents.defaults.compaction has a knob for this: maxActiveTranscriptBytes. Left unset, it does no transcript-size-driven compaction. The other knob worth turning on is memoryFlush.enabled with forceFlushTranscriptBytes, which runs a memory-extraction pass to save key facts to a separate file before the compactor throws history away.

The duplication I missed Link to heading

One section of my HEARTBEAT.md said “if no question has been sent today, send one” for a daily-question routine. A separate cron job also fired at 10:00 to send the same question. The cron payload referenced HEARTBEAT.md as a pre-read. So:

  1. The cron evaluated the same instructions and sent the question.
  2. Every subsequent heartbeat tick that day re-read HEARTBEAT.md, checked whether the question had been sent, and replied HEARTBEAT_OK.

Each of those HEARTBEAT_OK ticks still loaded the workspace bootstrap, the full session transcript, and tools to inspect the relevant state files before deciding to do nothing. With the heartbeat firing four times a day, the no-op evaluations cost more than the question itself.

I split ownership: the cron owns the once-a-day outbound question, and the telegram group’s systemPrompt owns the reactive “update the state files when a reply lands” half. The cron payload became self-contained with an idempotency check against the question log. HEARTBEAT.md shrank to one line.

The changes Link to heading

In openclaw.json:

"agents": {
  "defaults": {
    "heartbeat": {
      "every": "24h"           // was "4h"
    },
    "compaction": {
      "truncateAfterCompaction": true,
      "notifyUser": true,
      "maxActiveTranscriptBytes": "500kb",
      "memoryFlush": {
        "enabled": true,
        "forceFlushTranscriptBytes": "1mb"
      }
    }
  }
}

In the cron payload, removed the HEARTBEAT.md pre-read and inlined the question-asking rules with an idempotency check. In the telegram group systemPrompt, added the reactive update rules. In HEARTBEAT.md, deleted everything except the active-threads scan line.

I then reset the heartbeat and the cron sessions so the new prompts took effect immediately rather than waiting for the live transcripts to roll over. The reset is the same procedure I wrote up here.

What happened Link to heading

The day before the changes, my VM consumed about 2.2M tokens across 14 model calls. The first full day after, it consumed 256k tokens across 7 calls. Per-call averages dropped from roughly 160k tokens to 35k. The cacheRead column, which had been growing as transcripts accumulated, fell about 7x.

None of the sessions has compacted yet. With the heartbeat at one tick a day and crons running once a day each, a fresh session takes a while to reach 500 KB. The runtime now has a trigger to act on whenever a session does reach that threshold, instead of letting the transcript grow until the context window can no longer fit it.

Lessons Link to heading

Two things took me longer than they should have. I assumed heartbeat frequency was the dominant cost, and it was not; once I aggregated by sessionKey, the distribution showed up. I also assumed compaction was a thing that “just happens”, and it is not. Without a transcript-size trigger, I was relying on the model’s context window pressure to do compaction for me, and a generous context window means that pressure may never arrive.

Update, two weeks later Link to heading

The numbers above held for about twelve days. Daily totals tracked between 150k and 300k tokens, the weekly cap looked manageable, and I assumed the fix had stuck. Then the cap hit 25% with five days of the week still to go.

The culprit was the heartbeat again, but the failure mode was different. To slow it down I had at one point removed the agents.defaults.heartbeat block from openclaw.json entirely, on the assumption that “no config” meant “no heartbeat”. That assumption was wrong. With no block present, OpenClaw falls back to a built-in 30-minute default. After I restarted the gateway, it picked up that default, and the heartbeat fired 48 times a day. On the day I noticed, it had consumed about 2.5M tokens, more than the entire preceding week combined.

The fix was to put the block back with an explicit interval too long to matter:

"heartbeat": {
  "every": "7d"
}

OpenClaw clamps any interval past Node’s setTimeout ceiling (about 24.85 days) and logs a warning, but in practice the heartbeat now fires at most once a week.

What I take from this: removing a config block did not disable the feature. It fell back to the schema default. To turn something off I now set the knob explicitly. I also missed it because I never checked the gateway logs after the removal; the line that would have told me (heartbeat: started intervalMs:1800000) was in /tmp/openclaw/ from the start, I just hadn’t looked.

The 2026.5.28 release notes list “bound heartbeat defaults” as a fix, so this behaviour appears to be addressed upstream, though I have upgraded only recently and haven’t observed long enough to confirm. There is also an open issue (openclaw/openclaw#85025) tracking the broader pattern of opt-in safety knobs around session and compaction defaults; I added a comment on it after hitting the byte-size compaction trigger never firing on codex-backed sessions.

Further reading Link to heading