通过设置 cache-ttl 解决 OpenClaw 智能体退化问题

代码维护📅 2026/03/01
#开发者#GitHub#低风险#手动触发#可复用#半自动#代码#配置文件
nobody talks about this but OpenClaw has a hidden setting that changes everything.

in your config, add cache-ttl: 15m

this means your agent session resets after 15 minutes of inactivity instead of building up until it breaks.

most agents go stupid after 2-3 hours because the context window fills up. agent starts forgetting rules, hallucinating, ignoring instructions.

with a 15 min cache-ttl, every time you step away and come back, your agent reboots fresh - but reads its memory files on the way back in. clean slate, full memory, every time.

combine this with a 2 hour idle reset and your agent literally never degrades.

the people running agents for weeks straight without issues? this is their secret.