Skip to content

feat: persistent trace context — seamless cross-session behavioral loop#169

Merged
devonakelley merged 1 commit intomainfrom
feat/persistent-trace-context
Apr 27, 2026
Merged

feat: persistent trace context — seamless cross-session behavioral loop#169
devonakelley merged 1 commit intomainfrom
feat/persistent-trace-context

Conversation

@devonakelley
Copy link
Copy Markdown
Contributor

Previously user_rejected() only worked within the same Python session. Now it persists to ~/.kalibr/last_trace.json and loads automatically across restarts.

…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.
@devonakelley devonakelley merged commit 2818e80 into main Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant