Skip to content

fix: preserve goals across compression sessions - #33620

Closed
denisqq wants to merge 1 commit into
NousResearch:mainfrom
denisqq:fix/goal-compression-migration
Closed

fix: preserve goals across compression sessions#33620
denisqq wants to merge 1 commit into
NousResearch:mainfrom
denisqq:fix/goal-compression-migration

Conversation

@denisqq

@denisqq denisqq commented May 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add migrate_goal_to_session() so unfinished /goal state can be rebound from the compressed parent session to the continuation session.
  • Invoke goal migration from the context compression session-rotation path after the new session row is created.
  • Add a regression test proving the continuation session still sees the active goal after migration.

Closes #33618

Test plan

  • python -m pytest tests/hermes_cli/test_goals.py tests/gateway/test_goal_verdict_send.py tests/gateway/test_goal_status_notice.py tests/gateway/test_goal_max_turns_config.py tests/tui_gateway/test_goal_command.py -q -o 'addopts='
  • python -m pytest tests/run_agent/test_compression_persistence.py tests/run_agent/test_compression_boundary.py tests/run_agent/test_compression_boundary_hook.py tests/gateway/test_compression_session_id_persistence.py -q -o 'addopts='

@teknium1

Copy link
Copy Markdown
Contributor

Merged via #49772 — your authorship is preserved as a co-author trailer on the squashed/rebased commit. This combined cluster fix incorporates the /goal-migrates-across-compression-rotation fix from this PR. Thanks for the contribution! #49772

@teknium1 teknium1 closed this Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Persistent /goal is lost after context compression rotates session_id

3 participants