mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 23:40:45 +00:00
The official AGENTS.md template uses '## Every Session' and '## Safety', but post-compaction context extraction expects '## Session Startup' and '## Red Lines'. This causes workspaces using the official template to lose startup context and safety rules after compaction. Changes: - Rename template sections to match code expectations (both EN and zh-CN) - Add legacy fallback: code now tries 'Every Session'/'Safety' when 'Session Startup'/'Red Lines' are not found (backward compatible) - Add tests for legacy fallback and precedence when both exist