Persist explicit internal session provenance across saves and resume - #359
Draft
Brian Krabach (bkrabach) wants to merge 1 commit into
Draft
Brian Krabach (bkrabach) wants to merge 1 commit into
Brian Krabach (bkrabach) wants to merge 1 commit into
Conversation
This was referenced Sep 23, 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.
Internal background jobs currently leave ordinary root CLI histories without a reliable producer declaration. Persist an explicit
AMPLIFIER_SESSION_VISIBILITY=internaland bounded optionalAMPLIFIER_SESSION_PURPOSEat creation, before execution, then retain it through incremental/final/error saves and resume. Ordinary JSON/agent-launched conversations stay chats; independent human forks explicitly remain chats. No title/prompt/TTY heuristic or legacy rewrite.Validation: 134 targeted tests pass, covering actual native saves, initialization failure, failed execution, empty/legacy resume, all independent fork entrypoints, and shared ownership. An opt-in paired memory → actual CLI initializer/headless persistence → Unified discovery fixture passes with synthetic Core execution and zero model calls. Changed existing files add no Ruff findings relative to their baseline (87 existing findings); new provenance module/tests pass Ruff.
This is one part of a three-repository bridge: CLI persistence + Unified consumer support must be present for the memory producer label to prevent ordinary-list leakage. Production/example-session/browser acceptance was not performed; existing saved histories stay unchanged.
Paired Unified consumer: microsoft/amplifier-unified#187. Memory producer: microsoft/amplifier-bundle-memory#16. CLI producer: #359. This remains a reviewable three-part change; nothing has been merged or deployed by this task.