feat: persistent trace context — seamless cross-session behavioral loop#169
Merged
devonakelley merged 1 commit intomainfrom Apr 27, 2026
Merged
feat: persistent trace context — seamless cross-session behavioral loop#169devonakelley merged 1 commit intomainfrom
devonakelley merged 1 commit intomainfrom
Conversation
…al loop Previously user_rejected() / user_accepted() only worked within the same Python session where track_run() was called. This meant the behavioral loop broke if the agent restarted, the session ended, or the user came back later. Now: - set_last_run() writes trace_id + goal to ~/.kalibr/last_trace.json - _send_outcome() loads from disk if trace_id not in memory - user_rejected() / user_accepted() work across sessions, restarts, new agents The behavioral loop is now truly autonomous: run a pipeline, come back later, say 'that LinkedIn post was weak', call user_rejected() — it finds the right trace and updates priors. No session management required.
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.
Previously user_rejected() only worked within the same Python session. Now it persists to ~/.kalibr/last_trace.json and loads automatically across restarts.