{"record":{"id":"45bfe98304d4e6d5","repo":"tinyhumansai/openhuman","slug":"run-subagent-agent-id-failed-e","errorCode":null,"errorMessage":"run_subagent(`{agent_id}`) failed: {e}","messagePattern":"run_subagent\\(`(.+?)`\\) failed: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/triage/escalation.rs","lineNumber":299,"sourceCode":"    // is initialised, so this lookup for the target definition is safe here.\n    let registry = AgentDefinitionRegistry::global()\n        .ok_or_else(|| anyhow!(\"AgentDefinitionRegistry not initialised\"))?;\n    let definition = registry\n        .get(agent_id)\n        .ok_or_else(|| anyhow!(\"agent definition `{agent_id}` not found in registry\"))?;\n\n    tracing::debug!(\n        agent_id = %agent_id,\n        model = %parent_ctx.model_name,\n        tool_count = parent_ctx.all_tools.len(),\n        \"[triage::escalation] dispatching run_subagent with parent context\"\n    );\n\n    let outcome = with_parent_context(parent_ctx, async {\n        subagent_runner::run_subagent(definition, prompt, SubagentRunOptions::default()).await\n    })\n    .await\n    .map_err(|e| anyhow!(\"run_subagent(`{agent_id}`) failed: {e}\"))?;\n\n    tracing::debug!(\n        agent_id = %agent_id,\n        elapsed_ms = outcome.elapsed.as_millis() as u64,\n        iterations = outcome.iterations,\n        output_chars = outcome.output.chars().count(),\n        \"[triage::escalation] run_subagent completed\"\n    );\n\n    Ok(outcome.output)\n}\n\n/// Load the linked card from its board and hand it to the deterministic task\n/// dispatcher (claim → autonomous run → write-back). Errors (card not found,\n/// or claim rejected because another card is already in progress) propagate to\n/// the caller, which treats them as benign skips.\nasync fn dispatch_linked_card(\n    link: &TaskCardLink,","sourceCodeStart":281,"sourceCodeEnd":317,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/triage/escalation.rs#L281-L317","documentation":"The triage escalation path wrapped a failed run_subagent turn: the sub-agent's harness run itself errored (model/provider failure, turn timeout, or harness error) after the definition lookup and parent context build succeeded. The prefix names the dispatch site; the underlying error is the harness's.","triggerScenarios":"Thrown at src/openhuman/agent/triage/escalation.rs:299 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error for the harness/model cause","Verify the provider configured for the sub-agent is reachable","Retry the turn; transient provider failures commonly resolve"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}