Skip to content

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

fix(store): correct agent turn runner state persistence

Steven Enamakel86abd635f77e
diff --git a/app/src/store/index.ts b/app/src/store/index.ts
index c5b2a78d2b..a059e096e5 100644
--- a/app/src/store/index.ts
+++ b/app/src/store/index.ts
@@ -273,6 +273,12 @@ export const store = configureStore({
// completion, resets on restart + user switch. Durable storage is a #3931
// follow-up.
userErrors: userErrorsReducer,
+ // Live thread-level harness state (todos, goal, plan/build run mode),
+ // driven by dedicated core events/RPCs rather than tool-result scraping.
+ // In-memory only: re-fetched on thread open / reconnect.
+ threadTodos: threadTodosReducer,
+ threadGoal: threadGoalReducer,
+ runMode: runModeReducer,
},
middleware: getDefaultMiddleware => {
const middleware = getDefaultMiddleware({
diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs b/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs
index ac7215dd3b..419a3ab45c 100644
--- a/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs
@@ -281,6 +281,10 @@ async fn run_turn_via_tinyagents_inner(
hosted_root.is_some(),
pause_at_cap,
run_context.tool_dialect,
+ run_context
+ .thread_id
+ .as_deref()
+ .map(crate::agent::tinyagents::run_mode::handle_for_thread),
);
// Fail-closed registry validation gate (issue #4249, Workstream 10 — registry).