Skip to content

Compact context while waiting for delegates without delaying input - #41

Merged
Brian Krabach (bkrabach) merged 3 commits into
mainfrom
codex/active-goal-compaction-20261128
Nov 28, 2026
Merged

Brian Krabach (bkrabach) merged 3 commits into
mainfrom
codex/active-goal-compaction-20261128

Conversation

@bkrabach

@bkrabach Brian Krabach (bkrabach) commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

A manager with an active goal sleeps correctly while delegates run, but context compaction previously waited for the whole turn/goal to finish. Long-running managers therefore kept sending very large requests despite having quiet delegate waits available.

Have live_job.wait offer that actual idle interval to the turn engine's optional measured maintenance hook. Already-queued input takes priority; new input or a delegate result wakes the existing event wait. The change does not poll, restart delegates or modify Stop. Exact peer revisions are installed in CI, and all four integration cases must run without skips.

Validation: 48 focused Live tests pass after rebasing onto #39. Four new cross-module cases verify compaction reduces the measured request below half, a human receives a response before a paid checkpoint finishes, the same delegates each report once (including sibling completion), and Stop remains effective. Context and Streaming focused suites additionally pass 178 and 201 tests respectively. These are synthetic provider fixtures; installed Spark-1 acceptance follows release qualification.

Source graph: Loop Streaming 571f6869707126bbc88c73304f6802baa6b38911 and Managed Context d04fae3049b7fa7da47eb0e0271c0bf06669cb62. CI pins those exact candidates. Older engines without the hook retain the existing wait behavior. Unified must select the three accepted revisions together before adoption.

Companion changes: microsoft/amplifier-bundle-context-managed#64, microsoft/amplifier-module-loop-streaming#83.

@bkrabach
Brian Krabach (bkrabach) merged commit ad79da0 into main Nov 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant