A self-improving RLM agent for coding workflows and long-running autonomous tasks.
Rust
Tell daemonless sessions that subagents and wake-ups are unavailable (#3434)
Sebastian Müllerb3496ee86a55
diff --git a/crates/pa-core/src/prompts/system_prompt.rs b/crates/pa-core/src/prompts/system_prompt.rsindex 0a407a85fd..652e2a3a1c 100644--- a/crates/pa-core/src/prompts/system_prompt.rs+++ b/crates/pa-core/src/prompts/system_prompt.rs@@ -88,6 +88,8 @@ pub struct BuildSystemPromptOptions<'a> {pub rlm_depth: Option<u32>,/// Human-readable parent name or id for child communication doctrine.pub rlm_parent_agent: Option<&'a str>,+ /// Whether the session has no RLM child runtime (no daemon to spawn through).+ pub daemonless: bool,/// Enabled user-configured generic MCP servers.pub generic_mcp_servers: Vec<String>,}@@ -303,6 +305,12 @@ fn session_role_section(options: &BuildSystemPromptOptions, has_ipython: bool) -"Recursive agent depth: {depth}{}",if depth == 0 { " (root)" } else { " (not root)" })];+ if options.daemonless {+ lines.push(+ "Subagents and completion notifications are unavailable in this session (no daemon): rlm.spawn will error, and nothing wakes you after your turn ends, so await background commands before ending it. Plan to do all work yourself."+ .to_string(),+ );+ }if !has_ipython {lines.push("This session has no Python REPL (`ipython` tool): the programmatic tools described above are unavailable here."diff --git a/crates/pa-core/src/session_engine/engine.rs b/crates/pa-core/src/session_engine/engine.rsindex 4d0fa4a45c..692b2a3838 100644--- a/crates/pa-core/src/session_engine/engine.rs+++ b/crates/pa-core/src/session_engine/engine.rs@@ -488,6 +488,7 @@ pub async fn create_session(mut config: SessionEngineConfig) -> anyhow::Result<S// A spawned child's prompt must read "depth: N (not root)" with// the child-agent reply doctrine, never the root identity.rlm_depth: config.rlm_depth,+ daemonless: config.rlm_subagent_host.is_none(),generic_mcp_servers,prompt_guidelines: Some(prompt_guidelines),..Default::default()