Repository navigation
Compact context while waiting for delegates without delaying input - #41
Merged
Brian Krabach (bkrabach) merged 3 commits intoNov 28, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.waitoffer 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
571f6869707126bbc88c73304f6802baa6b38911and Managed Contextd04fae3049b7fa7da47eb0e0271c0bf06669cb62. 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.