fix(agent): migrate goal state across compression session rotation - #34035
fix(agent): migrate goal state across compression session rotation#34035sharziki wants to merge 1 commit into
Conversation
Goal state is stored in state_meta under `goal:<session_id>`. When context compression rotates the session_id to create a continuation session, GoalManager for the new id finds no goal — the user's /goal silently disappears. Copy the active goal to the continuation session's key during compression, following the same pattern used for session titles, system prompts, context engine hooks, and memory manager hooks. Closes NousResearch#33618 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Thanks for this — the diagnosis and fix are correct for the rotation path. Context on why we're closing it: as of #52658 (#38763), Rotation now only runs as an explicit opt-out ( |
Summary
state_metaundergoal:<session_id>; when context compression rotates the session_id,GoalManagerfor the new id finds no goal — the user's/goalsilently disappearsTest plan
test_goal_migrates_across_session_rotationintests/hermes_cli/test_goals.pyCloses #33618
🤖 Generated with Claude Code