Merge pull request #685 from Fail-Safe/fix/researcher-hand-defaults

fix: make heartbeat interval configurable and reduce researcher max_iterations
This commit is contained in:
Jaber Jaber
2026-03-27 16:39:31 +03:00
committed by GitHub
3 changed files with 13 additions and 1 deletions
@@ -161,7 +161,10 @@ provider = "default"
model = "default"
max_tokens = 16384
temperature = 0.3
max_iterations = 80
max_iterations = 25
# Researcher makes long LLM calls; 30s (kernel default) causes false-positive
# recovery triggers. 120s matches typical deep-research call latency.
heartbeat_interval_secs = 120
system_prompt = """You are Researcher Hand — an autonomous deep research agent that conducts exhaustive investigations, cross-references sources, fact-checks claims, and produces comprehensive structured reports.
## Phase 0 — Platform Detection & Context (ALWAYS DO THIS FIRST)
+5
View File
@@ -293,6 +293,11 @@ pub struct HandAgentConfig {
pub system_prompt: String,
#[serde(default)]
pub max_iterations: Option<u32>,
/// Heartbeat interval in seconds for autonomous agents. Overrides the
/// AutonomousConfig default (30s), which is too aggressive for agents
/// making long LLM calls. Omit to use the kernel default.
#[serde(default)]
pub heartbeat_interval_secs: Option<u64>,
}
fn default_module() -> String {
+4
View File
@@ -3320,6 +3320,10 @@ impl OpenFangKernel {
],
autonomous: def.agent.max_iterations.map(|max_iter| AutonomousConfig {
max_iterations: max_iter,
// Use the hand-declared heartbeat interval if provided.
// The kernel default (30s) is too aggressive for hands making long LLM calls;
// HAND.toml authors should set this to reflect expected call latency.
heartbeat_interval_secs: def.agent.heartbeat_interval_secs.unwrap_or(30),
..Default::default()
}),
// Autonomous hands must run in Continuous mode so the background loop picks them up.