feat: support awaited extension continuity across compaction - #683
Closed
phernandez wants to merge 2 commits into
Closed
feat: support awaited extension continuity across compaction#683phernandez wants to merge 2 commits into
phernandez wants to merge 2 commits into
Conversation
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
This was referenced Sep 6, 2026
Merged
Author
|
Superseded by #687, submitted from the Basic Machines organization fork: https://github.com/basicmachines-co/tau. The replacement contains the identical tested commit; please direct review there. This work supports Basic Memory continuity: basicmachines-co/basic-memory#1489. |
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.
Why
Refs #506. Memory extensions need to finish a checkpoint before context replacement, recover its receipt on the correct branch, and insert recall before the next prompt without triggering another agent response. Basic Memory is the concrete consumer: basicmachines-co/basic-memory#1489.
What Changed
context.branch_entries: deep-copied persisted active-path entries, including custom receipts, for reload/resume reconciliation and branch lineage.await context.summarize(messages, instructions=..., timeout=60): bounded tool-free synthesis using the active model/provider, without an agent turn or history mutation. Generation guards reject late results.await tau.append_message(content, custom_type=...): persist reference context while idle before the next prompt. Queued follow-ups—even with trigger_turn=False—can generate another model response; this method does not queue a turn.Design and Boundaries
No persistence destinations, exposed credentials, installed-package patches, or detached summary tasks in core. Extensions select inputs, own cancellation, validate writes and retain receipts. Observation failures preserve the diagnostic-only contract; this is not a compaction veto API.
This addresses extension delivery from #506, not threshold/manual frontend async-iterator or TUI status work, and deliberately does not close that issue. entry_appended delivery is unchanged; persisted active-path inspection supports receipt reconstruction without it.
Verification
uv run pytest -q: 1881 passed, 2 Windows-only tests skipped on macOS.uv run mypy: passed for 121 source files./reload, and real Basic Memory transcript/checkpoint persistence in temporary projects. Model providers are deterministic fakes; no production user session or paid model was used.Risks
Summary calls use the active provider's ordinary routing/billing. Extensions must choose bounded inputs and timeouts and must not treat a queued instruction or diagnostic-only callback as acknowledgement of an external write. References inserted with append_message are persisted custom messages and contribute to normal context size until compacted.