Skip to content

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

fix(agent): handle subagent lifecycle state transitions correctly

Steven Enamakel6dc92e96ccf2
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
index 40249bb09f..96334ef8ff 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
@@ -1027,7 +1027,6 @@ impl tinyagents_orchestration::subagent::SubagentPersistence for OpenHumanPersis
.collect(),
question: paused.reason.clone(),
options: None,
- toolkit_override: optional_metadata("toolkit_override"),
skill_filter_override: optional_metadata("skill_filter_override"),
model_override: optional_metadata("model_override"),
created_at: chrono::Utc::now().to_rfc3339(),
@@ -1166,10 +1165,6 @@ fn host_outcome_to_neutral(
"worker_thread_id".into(),
options.worker_thread_id.clone().unwrap_or_default(),
),
- (
- "toolkit_override".into(),
- options.toolkit_override.clone().unwrap_or_default(),
- ),
(
"skill_filter_override".into(),
options.skill_filter_override.clone().unwrap_or_default(),
diff --git a/crates/openhuman-core/src/agent/subagent_host/types.rs b/crates/openhuman-core/src/agent/subagent_host/types.rs
index b3a553e38b..4bce2e74cd 100644
--- a/crates/openhuman-core/src/agent/subagent_host/types.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/types.rs
@@ -21,11 +21,6 @@ pub struct SubagentRunOptions {
/// starts with `{skill}__`. Overrides `definition.skill_filter`.
pub skill_filter_override: Option<String>,
- /// Optional Composio toolkit scope (e.g. `"gmail"`, `"notion"`).
- /// When set, the sub-agent's rendered `Connected Integrations`
- /// section is narrowed to only that toolkit's entry.
- pub toolkit_override: Option<String>,
-
/// Optional context blob the parent wants to inject before the
/// task prompt. Rendered as a `[Context]\n…\n` prefix.
pub context: Option<String>,
@@ -237,8 +232,9 @@ pub struct SubagentCheckpointData {
pub history: Vec<ChatMessage>,
pub question: String,
pub options: Option<Vec<String>>,
- /// Composio toolkit override, if the paused run was scoped to one.
- pub toolkit_override: Option<String>,
+ // A legacy `toolkit_override` key (written before the toolkit spawn
+ // argument was retired) is ignored on load: this type does not deny
+ // unknown fields, so old checkpoints stay readable.
/// Workflow filter override, if the paused run was scoped to one.
pub skill_filter_override: Option<String>,
/// Model override, if one was set for this run.