Repository navigation
Native memory callbacks retain their conversation protection - #850
Merged
Merged
Conversation
Keep constructor and callback contributors across rebinding and native awaits. Stop later automatic capture after a marked recall while preserving native history and unacknowledged batch semantics. Signed-off-by: zlareb1 <[email protected]>
A shared monotonic patch could expire a freshly loaded model-call policy before the bearer test reached its first request. Exercise the same attributed token rotation at two clock epochs without changing the policy clock. Signed-off-by: zlareb1 <[email protected]>
This was referenced Nov 18, 2026
Merged
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.
Related: #840
Related: #849
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
Agent Framework and Pipecat memory callbacks retain protection for every contributing conversation. Protection stops later automatic recall and extraction across client rebinding and deferred callbacks.
Why
Native callbacks can run after their originating context exits or the Loom client is rebound. Retaining only the current client handle loses the conversation that supplied the text. Each adapter therefore retains its constructor and callback contributors for the lifetime of its conversation instance.
Scope and risk
Both adapters use one private helper to retain the application-owned handle union and enter the existing automatic SDK context. No native user or session id selects protection authority. The transport keeps response observation and the final credential and dispatch barriers.
A first marked recall can reach native prompt assembly after durable protection. Later automatic reads and extraction refuse, including subsequent batches. Agent Framework propagates suppression through its existing provider lifecycle; a failure after the model answers cannot undo that answer or tool effects.
Pipecat retains callback handles before awaiting the native frame processor, including committed context frames whose capture runs later. Suppression skips automatic memory work while frames keep flowing. Protection clears only service-owned retry references and write tracking, preserving application history and avoiding acknowledgment of unsent batches. Existing speculative-frame exclusion and clean partial-capture retry behavior remain.
Use one provider or service per logical conversation family, with its existing application-owned capsule bound before construction. Restored families reopen their existing authority. Explicit selected tools and other adapters are unchanged. This change creates no capsule, sends no capability declaration and does not qualify a host, platform backend or fleet.
Compatibility, rollout and rollback
Tests
AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated: Codex wrote the change; fresh independent whole-diff review and final-head CI are required before merge.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist