Fix OpenClaw Agent Degradation with Cache TTL
Code Maintenance📅 2026/03/01
#Developer#GitHub#Low Risk#Manual Trigger#Reusable#Semi-Automatic#代码#配置文件
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.
