Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: add prefix_reset field to transcript metadata initializers

Steven Enamakelc8105610cae4
diff --git a/crates/openhuman-core/src/agent/session_host/codec_adoption_tests.rs b/crates/openhuman-core/src/agent/session_host/codec_adoption_tests.rs
index 973420222c..0de3d6f8ab 100644
--- a/crates/openhuman-core/src/agent/session_host/codec_adoption_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/codec_adoption_tests.rs
@@ -15,6 +15,7 @@ fn meta() -> tinyagents_session::transcript::TranscriptMeta {
updated: chrono::Utc::now().to_rfc3339(),
turn_count: 0,
prefix_message_count: None,
+ prefix_reset: false,
input_tokens: 0,
output_tokens: 0,
cached_input_tokens: 0,
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs
index 4acc0ecfed..9bbd960cdb 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs
@@ -358,6 +358,7 @@ fn meta() -> TranscriptMeta {
updated: chrono::Utc::now().to_rfc3339(),
turn_count: 0,
prefix_message_count: None,
+ prefix_reset: false,
input_tokens: 0,
output_tokens: 0,
cached_input_tokens: 0,
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session/identity.rs b/crates/openhuman-core/src/agent/session_host/runtime_session/identity.rs
index 372fd7c651..a6854239e4 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_session/identity.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_session/identity.rs
@@ -73,6 +73,7 @@ impl OpenHumanSessionHost {
updated: now,
turn_count: 0,
prefix_message_count: None,
+ prefix_reset: false,
input_tokens: 0,
output_tokens: 0,
cached_input_tokens: 0,
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/graph/transcript.rs b/crates/openhuman-core/src/agent/subagent_host/ops/graph/transcript.rs
index 7cb4a49ad3..168a288ced 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/graph/transcript.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/graph/transcript.rs
@@ -192,6 +192,7 @@ pub(super) fn persist_subagent_transcript(
updated: now,
turn_count: 1,
prefix_message_count: None,
+ prefix_reset: false,
input_tokens: usage.input_tokens,
output_tokens: usage.output_tokens,
cached_input_tokens: usage.cached_input_tokens,
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/graph_failed_run_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops/graph_failed_run_tests.rs
index ee0c98312e..280537effd 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/graph_failed_run_tests.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/graph_failed_run_tests.rs
@@ -49,6 +49,7 @@ fn read_stem(
updated: String::new(),
turn_count: 0,
prefix_message_count: None,
+ prefix_reset: false,
input_tokens: 0,
output_tokens: 0,
cached_input_tokens: 0,
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/graph_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops/graph_tests.rs
index 1250160016..da7277f856 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/graph_tests.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/graph_tests.rs
@@ -26,6 +26,7 @@ fn read_stem(
updated: String::new(),
turn_count: 0,
prefix_message_count: None,
+ prefix_reset: false,
input_tokens: 0,
output_tokens: 0,
cached_input_tokens: 0,
diff --git a/crates/openhuman-core/src/config/migrations/mod_tests.rs b/crates/openhuman-core/src/config/migrations/mod_tests.rs
index 7f14c49d3b..4105c12d65 100644
--- a/crates/openhuman-core/src/config/migrations/mod_tests.rs
+++ b/crates/openhuman-core/src/config/migrations/mod_tests.rs
@@ -62,6 +62,7 @@ fn meta() -> TranscriptMeta {
updated: "2026-05-01T00:00:00Z".into(),
turn_count: 1,
prefix_message_count: None,
+ prefix_reset: false,
input_tokens: 0,
output_tokens: 0,
cached_input_tokens: 0,
diff --git a/crates/openhuman-core/src/cron/scheduler/origin_delivery_tests.rs b/crates/openhuman-core/src/cron/scheduler/origin_delivery_tests.rs
index 6542419fdf..c523b4137f 100644
--- a/crates/openhuman-core/src/cron/scheduler/origin_delivery_tests.rs
+++ b/crates/openhuman-core/src/cron/scheduler/origin_delivery_tests.rs
@@ -291,6 +291,7 @@ fn meta() -> TranscriptMeta {
updated: "2026-10-06T00:00:00Z".into(),
turn_count: 1,
prefix_message_count: None,
+ prefix_reset: false,
input_tokens: 0,
output_tokens: 0,
cached_input_tokens: 0,
diff --git a/crates/openhuman-core/src/storage/import/sessions_tests.rs b/crates/openhuman-core/src/storage/import/sessions_tests.rs
index edb3aaafe1..bf2c8292d5 100644
--- a/crates/openhuman-core/src/storage/import/sessions_tests.rs
+++ b/crates/openhuman-core/src/storage/import/sessions_tests.rs
@@ -198,6 +198,7 @@ fn profile_phase_out_rewrites_imported_bytes_without_mutating_legacy_source() {
updated: "2026-01-01T00:00:00Z".into(),
turn_count: 1,
prefix_message_count: None,
+ prefix_reset: false,
input_tokens: 0,
output_tokens: 0,
cached_input_tokens: 0,
@@ -331,6 +332,7 @@ fn meta(thread: &str, agent: &str) -> TranscriptMeta {
updated: "2026-01-01T00:00:00Z".into(),
turn_count: 1,
prefix_message_count: None,
+ prefix_reset: false,
input_tokens: 0,
output_tokens: 0,
cached_input_tokens: 0,
diff --git a/crates/openhuman-core/src/storage/sessions/mod_tests.rs b/crates/openhuman-core/src/storage/sessions/mod_tests.rs
index ce9884a959..38151d7992 100644
--- a/crates/openhuman-core/src/storage/sessions/mod_tests.rs
+++ b/crates/openhuman-core/src/storage/sessions/mod_tests.rs
@@ -90,6 +90,7 @@ async fn without_a_store_transcripts_come_from_the_workspace_store_not_files() {
updated: "2026-10-15T00:00:00Z".into(),
turn_count: 0,
prefix_message_count: None,
+ prefix_reset: false,
input_tokens: 0,
output_tokens: 0,
cached_input_tokens: 0,
diff --git a/crates/openhuman-core/src/storage/sessions/splice_fixture_tests.rs b/crates/openhuman-core/src/storage/sessions/splice_fixture_tests.rs
index e3e9d8faea..e47a38ecb8 100644
--- a/crates/openhuman-core/src/storage/sessions/splice_fixture_tests.rs
+++ b/crates/openhuman-core/src/storage/sessions/splice_fixture_tests.rs
@@ -101,6 +101,7 @@ pub(crate) fn blank_meta() -> TranscriptMeta {
updated: "2026-01-01T00:00:00Z".into(),
turn_count: 0,
prefix_message_count: None,
+ prefix_reset: false,
input_tokens: 0,
output_tokens: 0,
cached_input_tokens: 0,
diff --git a/crates/openhuman-core/src/threads/ops/edit_tests.rs b/crates/openhuman-core/src/threads/ops/edit_tests.rs
index 4e13591a50..dd3ef42c8b 100644
--- a/crates/openhuman-core/src/threads/ops/edit_tests.rs
+++ b/crates/openhuman-core/src/threads/ops/edit_tests.rs
@@ -41,6 +41,7 @@ fn base_meta(agent_id: &str, thread_id: &str) -> TranscriptMeta {
updated: "2026-09-24T00:00:00Z".into(),
turn_count: 0,
prefix_message_count: None,
+ prefix_reset: false,
input_tokens: 0,
output_tokens: 0,
cached_input_tokens: 0,
diff --git a/crates/openhuman-core/src/threads/ops/transcript_tests.rs b/crates/openhuman-core/src/threads/ops/transcript_tests.rs
index ca4618aee1..366d2f4d22 100644
--- a/crates/openhuman-core/src/threads/ops/transcript_tests.rs
+++ b/crates/openhuman-core/src/threads/ops/transcript_tests.rs
@@ -47,6 +47,7 @@ fn meta(agent: &str, agent_type: &str) -> TranscriptMeta {
updated: "2026-10-15T00:00:00Z".into(),
turn_count: 1,
prefix_message_count: None,
+ prefix_reset: false,
input_tokens: 0,
output_tokens: 0,
cached_input_tokens: 0,
diff --git a/crates/openhuman-core/src/threads/transcript_host_tests.rs b/crates/openhuman-core/src/threads/transcript_host_tests.rs
index 1dc978b8c5..65e8cbcd93 100644
--- a/crates/openhuman-core/src/threads/transcript_host_tests.rs
+++ b/crates/openhuman-core/src/threads/transcript_host_tests.rs
@@ -188,6 +188,7 @@ fn text_dialect_tool_turn_projects_calls_on_their_issuing_row_as_settled() {
updated: "2026-09-24T00:00:00Z".into(),
turn_count: 1,
prefix_message_count: None,
+ prefix_reset: false,
input_tokens: 0,
output_tokens: 0,
cached_input_tokens: 0,
@@ -397,6 +398,7 @@ fn tool_failure_metadata_round_trips_write_to_display_line() {
updated: now,
turn_count: 1,
prefix_message_count: None,
+ prefix_reset: false,
input_tokens: 0,
output_tokens: 0,
cached_input_tokens: 0,
diff --git a/crates/openhuman-core/src/web_chat/session_checkout_tests.rs b/crates/openhuman-core/src/web_chat/session_checkout_tests.rs
index ff9b7618db..10c64f0eeb 100644
--- a/crates/openhuman-core/src/web_chat/session_checkout_tests.rs
+++ b/crates/openhuman-core/src/web_chat/session_checkout_tests.rs
@@ -65,6 +65,7 @@ fn seed_legacy_thread_transcript(workspace_dir: &Path, stem: &str, thread_id: &s
updated: "2026-09-20T15:36:32Z".into(),
turn_count: rows.len() / 2,
prefix_message_count: None,
+ prefix_reset: false,
input_tokens: 0,
output_tokens: 0,
cached_input_tokens: 0,