Skip to content

fix(agent): bound context compression summary stalls - #49905

Closed
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/49768-compression-hard-timeout
Closed

fix(agent): bound context compression summary stalls#49905
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/49768-compression-hard-timeout

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • run compression summary generation behind a worker-thread hard timeout keyed to auxiliary.compression.timeout
  • fall back to the existing deterministic summary path instead of blocking the dashboard/gateway loop indefinitely
  • add regression coverage for the hard-timeout wrapper contract

Fixes #49768

Testing

  • pytest tests/agent/test_context_compressor.py -q
  • pytest tests/run_agent/test_413_compression.py -q
  • pytest tests/run_agent/test_compression_feasibility.py -q
  • ruff check agent/context_compressor.py tests/agent/test_context_compressor.py
  • git diff --check

@alt-glitch alt-glitch added type/bug Something isn't working comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P1 High — major feature broken, no workaround labels Jun 21, 2026
@teknium1 teknium1 added sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jun 21, 2026
@kshitijk4poor

Copy link
Copy Markdown
Collaborator

Superseded by #56295, which carries your commit verbatim (authorship preserved) rebased onto current main (this was ~592 commits behind; two cosmetic conflicts resolved), plus a rebase follow-up. Fixing the rebase surfaced a real production gap: the hard TimeoutError was being classified as a network close (_is_connection_error matches any 'Timeout'-named exception), so compress() ABORTED instead of falling back — the opposite of your intent. Gated it (_is_streaming_closed = ... and not _is_timeout), mutation-verified against your own test. Ran hermes-agent-dev + hermes-pr-review Phase 2c (0 Critical). Full credit to you for the fix and the test that caught the gap. Closing in favor of #56295 — feel free to push back.

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 P1 High — major feature broken, no workaround sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard freeze: CPU 100% when context compression runs → Desktop client timeout

4 participants