← 回總覽

修复由 Cron 任务臃肿导致的 OpenClaw 性能问题

📅 2026-03-19 10:30 Alex Finn 人工智能 1 分鐘 1126 字 評分: 86
OpenClaw AI Agent 性能优化 提示词工程 调试
📌 一句话摘要 通过清理上下文窗口中过多的 Cron 任务会话数据,优化 OpenClaw,使其速度提升 95%。 📝 详细摘要 作者分享了一个针对 OpenClaw AI Agent 常见性能瓶颈的实用解决方案。通过发现 Cron 任务的输出占用了过多的上下文窗口,作者提供了一个特定的提示词来清理会话文件,从而显著提高了工具的响应速度。 📊 文章信息 AI 评分:86 来源:Alex Finn(@AlexFinnX) 作者:Alex Finn 分类:人工智能 语言:英文 阅读时间:5 分钟 字数:1127 标签: OpenClaw, AI Agent, 性能优化, 提示词工程, 调试

IF YOU'RE ON OPENCLAW DO THIS NOW: I just sped up my OpenClaw by 95% with a single prompt

Over the past week my claw has been unbelievably slow. Turns out the output of EVERY cron job gets loaded into context

Months of cron outputs sent with every message

Do this prompt now:

"Check how many session files are in ~/.openclaw/agents/main/sessions/ and how big sessions.json is. If there are thousands of old cron session files bloating it, delete all the old .jsonl files except the main session, then rebuild sessions.json to only reference sessions that still exist on disk."

This will delete all the session data around your cron outputs.

If you do a ton of cron jobs, this is a tremendous amount of bloat that does not need to be loaded into context and is MAJORLY slowing down your Openclaw

If you for some reason want to keep some of this cron session data in memory, then don't have your openclaw delete ALL of them. But for me, I have all the outputs automatically save to a Convex database anyway, so there was no reason to keep it all in context.

Instantly sped up my OpenClaw from unusable to lightning quick

查看原文 → 發佈: 2026-03-19 10:30:20 收錄: 2026-03-19 14:00:54

🤖 問 AI

針對這篇文章提問,AI 會根據文章內容回答。按 Ctrl+Enter 送出。