Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

fix(agent): exact wire names win over declared host names; correct the RPC docs (#9082)

Akarshan Biswas4d07e8901db9
diff --git a/adk/python/jan_adk/_generated.py b/adk/python/jan_adk/_generated.py
index bee3d63ef..acccb4af9 100644
--- a/adk/python/jan_adk/_generated.py
+++ b/adk/python/jan_adk/_generated.py
@@ -214,11 +214,11 @@ class SessionStartParams(TypedDict):
ephemeral: NotRequired[bool]
# Host tools this session may call. Kept as raw values until declaration so a malformed entry is reported as `invalid_tools` with the reason, rather than as a generic params error that names nothing.
tools: NotRequired[list[HostToolDeclSchema]]
- # `false` advertises only the host tools: no built-ins, MCP, plugin, `ask`, `todo`, subagent or monitor tools.
+ # `false` advertises only the host tools: no built-ins, MCP, plugin, `ask`, `todo` or monitor tools. `subagents: true` adds back only `dispatch_subagent` and `list_subagents`.
builtins: NotRequired[bool]
# Whether the session may delegate to subagents; defaults to `builtins`. With `builtins: false` it adds only `dispatch_subagent` and `list_subagents`, and every child is held to the session's host tools. `false` withholds subagent tools even from a session with built-ins.
subagents: NotRequired[Union[bool, None]]
- # The session's whole system prompt, sent byte for byte in place of the one Jan composes: no Jan identity, guides, environment, date, git state or project memory. Children keep their own prompts.
+ # The session's whole system prompt, sent byte for byte in place of the one Jan composes: no Jan identity, guides, environment, date, git state or project memory, and the session neither recalls nor indexes project memory. Jan may still append runtime notices to the conversation. Children keep their own prompts.
systemPrompt: NotRequired[Union[str, None]]
permissions: NotRequired[PermissionOwner]
diff --git a/adk/python/jan_adk/runtime.py b/adk/python/jan_adk/runtime.py
index a13a658ea..66144d595 100644
--- a/adk/python/jan_adk/runtime.py
+++ b/adk/python/jan_adk/runtime.py
@@ -214,7 +214,9 @@ class JanRuntime:
``subagents`` lets the model delegate (default: same as ``builtins``);
with ``builtins=False`` every child is limited to these host tools.
- ``system_prompt`` is sent exactly as given in place of Jan's prompt.
+ ``system_prompt`` is sent exactly as given in place of Jan's prompt;
+ the session then neither recalls nor indexes project memory, and Jan
+ may still append runtime notices to the conversation.
``permissions`` says who gates a host tool call: ``"host"`` when this
process runs and gates its own tools, so the runtime never prompts for
diff --git a/docs/src/pages/docs/agent/protocol.mdx b/docs/src/pages/docs/agent/protocol.mdx
index 6ffa9fd46..0831dd56d 100644
--- a/docs/src/pages/docs/agent/protocol.mdx
+++ b/docs/src/pages/docs/agent/protocol.mdx
@@ -89,9 +89,9 @@ and the host's answer becomes the model's tool message. Request and parameter sh
| Field | Default | Meaning |
| --- | --- | --- |
| `tools` | `[]` | Declarations `{name, description?, parameters?, capability?}`. `capability` is `read` or `actuator`; absent is opaque. |
-| `builtins` | `true` | `false` advertises only the host tools: no built-ins, MCP, plugin, `ask`, `todo`, subagent or monitor tools. |
+| `builtins` | `true` | `false` advertises only the host tools: no built-ins, MCP, plugin, `ask`, `todo` or monitor tools. `subagents: true` adds back only `dispatch_subagent` and `list_subagents`. |
| `subagents` | same as `builtins` | Whether the model may delegate. With `builtins: false`, `true` adds only `dispatch_subagent` and `list_subagents`, and every child is limited to the session's host tools (no shell, files, web or skills). A child's host tool call arrives as an ordinary `item/tool_request` with `run_id` set. `false` removes subagent tools even when built-ins are on. |
-| `systemPrompt` | none | The whole system prompt, sent exactly as given. Jan adds nothing to it: no identity, guides, environment, date, git state, plan/todo guidance or project memory. Subagents keep their own prompts. Kept across `session/model/set` and `session/fork`. A blank string fails with `-32602`. |
+| `systemPrompt` | none | The whole system prompt, sent exactly as given: no identity, guides, environment, date, git state, plan/todo guidance or project memory recall, and the session does not index project memory either. The system prompt is exactly yours; Jan may still append runtime notices to the conversation (`<SYSTEM>` notes such as a finished subagent, cost or token-budget notices, and compaction summaries). Subagents keep their own prompts. Kept across `session/model/set` and `session/fork`. A blank string fails with `-32602`. |
| `permissions` | `"jan"` | `"host"` means the host's callback is the gate: Jan never sends a `permission_request` for a host tool. Built-ins are unaffected. |
The result is `{sessionId, model, tools, toolSpecs}`. `tools` lists the names the next turn
diff --git a/packages/adk/src/generated/rpc-types.d.ts b/packages/adk/src/generated/rpc-types.d.ts
index 91560b56e..9060bc00e 100644
--- a/packages/adk/src/generated/rpc-types.d.ts
+++ b/packages/adk/src/generated/rpc-types.d.ts
@@ -171,11 +171,11 @@ export interface SessionStartParams {
"ephemeral"?: boolean
/** Host tools this session may call. Kept as raw values until declaration so a malformed entry is reported as `invalid_tools` with the reason, rather than as a generic params error that names nothing. */
"tools"?: HostToolDeclSchema[]
- /** `false` advertises only the host tools: no built-ins, MCP, plugin, `ask`, `todo`, subagent or monitor tools. */
+ /** `false` advertises only the host tools: no built-ins, MCP, plugin, `ask`, `todo` or monitor tools. `subagents: true` adds back only `dispatch_subagent` and `list_subagents`. */
"builtins"?: boolean
/** Whether the session may delegate to subagents; defaults to `builtins`. With `builtins: false` it adds only `dispatch_subagent` and `list_subagents`, and every child is held to the session's host tools. `false` withholds subagent tools even from a session with built-ins. */
"subagents"?: boolean | null
- /** The session's whole system prompt, sent byte for byte in place of the one Jan composes: no Jan identity, guides, environment, date, git state or project memory. Children keep their own prompts. */
+ /** The session's whole system prompt, sent byte for byte in place of the one Jan composes: no Jan identity, guides, environment, date, git state or project memory, and the session neither recalls nor indexes project memory. Jan may still append runtime notices to the conversation. Children keep their own prompts. */
"systemPrompt"?: string | null
"permissions"?: PermissionOwner
}
diff --git a/packages/adk/src/index.d.ts b/packages/adk/src/index.d.ts
index d2709b0c9..3ec6da0bd 100644
--- a/packages/adk/src/index.d.ts
+++ b/packages/adk/src/index.d.ts
@@ -121,7 +121,7 @@ export interface CreateSessionOptions {
model?: string
/** Keep nothing on disk: no thread, no media files, and no answers indexed for later recall. */
ephemeral?: boolean
- /** `false` advertises only the host tools, no built-ins or MCP. */
+ /** `false` advertises only the host tools, no built-ins or MCP. `subagents: true` adds back only `dispatch_subagent` and `list_subagents`. */
builtins?: boolean
/**
* Whether the model may delegate to subagents; defaults to `builtins`. With
@@ -131,8 +131,9 @@ export interface CreateSessionOptions {
subagents?: boolean
/**
* The whole system prompt, sent exactly as given in place of Jan's: no Jan
- * identity, guides, environment, date, git state or project memory.
- * Subagents keep their own prompts. Must not be blank.
+ * identity, guides, environment, date, git state or project memory (none is
+ * recalled or indexed). Jan may still append runtime notices to the
+ * conversation. Subagents keep their own prompts. Must not be blank.
*/
systemPrompt?: string
/**
diff --git a/protocol/rpc-schema.json b/protocol/rpc-schema.json
index 6f393c058..21d107b0d 100644
--- a/protocol/rpc-schema.json
+++ b/protocol/rpc-schema.json
@@ -92,7 +92,7 @@
"default": []
},
"builtins": {
- "description": "`false` advertises only the host tools: no built-ins, MCP, plugin,\n`ask`, `todo`, subagent or monitor tools.",
+ "description": "`false` advertises only the host tools: no built-ins, MCP, plugin,\n`ask`, `todo` or monitor tools. `subagents: true` adds back only\n`dispatch_subagent` and `list_subagents`.",
"type": "boolean",
"default": true
},
@@ -105,7 +105,7 @@
"default": null
},
"systemPrompt": {
- "description": "The session's whole system prompt, sent byte for byte in place of the\none Jan composes: no Jan identity, guides, environment, date, git state\nor project memory. Children keep their own prompts.",
+ "description": "The session's whole system prompt, sent byte for byte in place of the\none Jan composes: no Jan identity, guides, environment, date, git state\nor project memory, and the session neither recalls nor indexes project\nmemory. Jan may still append runtime notices to the conversation.\nChildren keep their own prompts.",
"type": [
"string",
"null"
diff --git a/src-tauri/jan-cli/tests/agent_rpc.rs b/src-tauri/jan-cli/tests/agent_rpc.rs
index e525fda2a..e808afd09 100644
--- a/src-tauri/jan-cli/tests/agent_rpc.rs
+++ b/src-tauri/jan-cli/tests/agent_rpc.rs
@@ -1265,3 +1265,69 @@ fn a_host_system_prompt_is_sent_verbatim_and_kept() {
rpc.close();
let _ = std::fs::remove_dir_all(scratch);
}
+
+/// With built-ins on, a child asking for a plugin tool by its wire name gets
+/// that plugin tool even though the host declared a tool under the same bare
+/// name, and a bare host name (`robot_arm_move`) still resolves to the host
+/// tool. What the parent could reach is recorded by the run itself, so this
+/// fails if that record stops being filled.
+#[test]
+fn a_child_keeps_the_parents_tool_over_a_host_tool_of_the_same_name() {
+ let scratch = scratch("host-delegate-collide");
+ let home = scratch.join("home");
+ let project = scratch.join("project");
+ let plugin = store(&home, &project).join("plugins").join("p");
+ std::fs::create_dir_all(&plugin).unwrap();
+ std::fs::write(
+ plugin.join("plugin.toml"),
+ "name = \"p\"\n\n[[tools]]\nname = \"echo\"\ndescription = \"Echo\"\ncommand = \"true\"\n",
+ )
+ .unwrap();
+ let dispatch = tool_call_reply(
+ "dispatch_subagent",
+ serde_json::json!({"subagents":[{"name":"mover","task":"say hi",
+ "allowed_tools":["plugin__p__echo","robot_arm_move"]}]}),
+ );
+ let (url, seen) = routed_provider(move |_, body| {
+ let answered = body["messages"]
+ .as_array()
+ .is_some_and(|messages| messages.iter().any(|m| m["role"] == "tool"));
+ let parent = advertised(body).iter().any(|name| name == "dispatch_subagent");
+ if parent && !answered { dispatch } else { PROSE }
+ });
+ configure(&home, &url);
+ let mut rpc = Rpc::open(&home);
+ rpc.handshake();
+ let lookalike = serde_json::json!({"name":"plugin__p__echo","description":"The host's own echo."});
+ let started = rpc.ask(serde_json::json!({"jsonrpc":"2.0","id":3,"method":"session/start","params":{
+ "cwd":project,"model":"stub-model","tools":[arm_tool(),lookalike],"permissions":"host","ephemeral":true
+ }}));
+ let session_id = started["result"]["sessionId"].as_str().unwrap_or_else(|| panic!("{started}")).to_owned();
+ complete_turn(&mut rpc, 4, &session_id);
+
+ let requests = seen.lock().unwrap();
+ let parent = requests
+ .iter()
+ .map(advertised)
+ .find(|names| names.iter().any(|name| name == "dispatch_subagent"))
+ .unwrap_or_else(|| panic!("the parent made no request: {requests:?}"));
+ assert!(parent.iter().any(|name| name == "plugin__p__echo"), "{parent:?}");
+ let child: Vec<Vec<String>> = requests
+ .iter()
+ .map(advertised)
+ .filter(|names| !names.iter().any(|name| name == "dispatch_subagent"))
+ .collect();
+ assert!(!child.is_empty(), "the child made no request: {requests:?}");
+ for names in &child {
+ assert!(names.iter().any(|name| name == "plugin__p__echo"), "{names:?}");
+ assert!(names.iter().any(|name| name == "host__robot_arm_move"), "{names:?}");
+ assert!(
+ !names.iter().any(|name| name.starts_with("host__plugin")),
+ "the host's lookalike took the plugin tool's place: {names:?}"
+ );
+ }
+ drop(requests);
+
+ rpc.close();
+ let _ = std::fs::remove_dir_all(scratch);
+}
diff --git a/src-tauri/src/core/agent/loop.rs b/src-tauri/src/core/agent/loop.rs
index 86b4a9509..69320b091 100644
--- a/src-tauri/src/core/agent/loop.rs
+++ b/src-tauri/src/core/agent/loop.rs
@@ -520,6 +520,9 @@ struct SubagentContext {
/// is held to (see
/// [`crate::core::agent::subagent::ParentRun::tool_ceiling`]).
tool_ceiling: Option<Vec<String>>,
+ /// Every non-host tool name this run could reach (see
+ /// [`crate::core::agent::subagent::ParentRun::known_tools`]).
+ known_tools: Vec<String>,
/// Background children of this run, aborted when the run ends.
bg: std::sync::Arc<crate::core::agent::subagent::BackgroundSubagents>,
/// The registry's teardown generation when this run started. A dispatch may
@@ -1295,6 +1298,7 @@ impl CompositeToolInvoker {
send_reasoning: ctx.send_reasoning,
cost_remaining: ctx.cost_ceiling,
tool_ceiling: ctx.tool_ceiling.clone(),
+ known_tools: ctx.known_tools.clone(),
},
&self.events,
// Unconfined means no scratch: the tools see the real
@@ -2442,6 +2446,14 @@ pub(crate) async fn run_orchestration_streamed(
/// Restrict the collected MCP tools to `allowed` (by tool name), pruning both
/// the OpenAI tool array and the tool->server routing map in lockstep.
+/// The function names in an OpenAI `tools` array.
+fn tool_names(tools: &[serde_json::Value]) -> Vec<String> {
+ tools
+ .iter()
+ .filter_map(|tool| tool["function"]["name"].as_str().map(str::to_owned))
+ .collect()
+}
+
fn apply_tool_allowlist(
openai_tools: &mut Vec<serde_json::Value>,
tool_to_server: &mut HashMap<String, String>,
@@ -3144,6 +3156,10 @@ async fn orchestrate_inner(
let (mut openai_tools, mut tool_to_server) =
collect_mcp_openai_tools(mcp_servers, mcp_settings).await?;
+ // Taken before plan mode, the allowlist and deny rules filter the list: a
+ // child naming a tool the parent withholds must still be read as that
+ // tool, never as a host tool that shares its bare name.
+ let mut known_tools = tool_names(&openai_tools);
// Optional per-run allowlist: when `allowed_tools` is present, expose only
// those MCP tools (an empty array means no tools). Absent = all tools.
@@ -3260,6 +3276,20 @@ async fn orchestrate_inner(
names.sort_unstable();
names
}),
+ known_tools: {
+ known_tools.extend(tool_names(&openai_tools));
+ if let Some(root) = project_root.as_deref() {
+ known_tools.extend(
+ crate::core::agent::hooks_config::resolve_plugin_tools(root)
+ .all()
+ .iter()
+ .map(|tool| tool.qualified_name.clone()),
+ );
+ }
+ known_tools.sort_unstable();
+ known_tools.dedup();
+ std::mem::take(&mut known_tools)
+ },
bg_generation: bg.generation(),
bg: bg.clone(),
});
diff --git a/src-tauri/src/core/agent/subagent.rs b/src-tauri/src/core/agent/subagent.rs
index 0892b26dd..d8a4215d6 100644
--- a/src-tauri/src/core/agent/subagent.rs
+++ b/src-tauri/src/core/agent/subagent.rs
@@ -511,12 +511,12 @@ pub fn intersect_allowed_tools(
/// normally given are dropped here unless the ceiling holds them.
fn capped_tools(
resolved: Option<Vec<String>>,
- ceiling: Option<&[String]>,
+ parent: &ParentRun,
child: &str,
parent_args: &crate::core::agent::r#loop::OrchestrationArgs,
) -> Result<Option<Vec<String>>, SubagentError> {
- let resolved = resolved.map(|tools| qualify_host_names(tools, parent_args));
- let Some(ceiling) = ceiling else {
+ let resolved = resolved.map(|tools| qualify_host_names(tools, &parent.known_tools, parent_args));
+ let Some(ceiling) = parent.tool_ceiling.as_deref() else {
return Ok(resolved);
};
let Some(requested) = resolved else {
@@ -543,19 +543,29 @@ fn capped_tools(
/// `arm.move`) to the wire name the child is offered it under. Looked up in the
/// declarations rather than prefixed: a dotted name maps to a hashed wire name
/// only the declaration still knows. Every other name passes through.
+///
+/// A name that is already a wire name -- one of the parent's `known` tools, or
+/// a host tool's qualified name -- is kept as is. The bare-name lookup is only
+/// the fallback, so a host that declared `host__observe` or an MCP or plugin
+/// tool's name cannot redirect a child that asked for that exact tool.
#[cfg(feature = "cli")]
fn qualify_host_names(
tools: Vec<String>,
+ known: &[String],
parent_args: &crate::core::agent::r#loop::OrchestrationArgs,
) -> Vec<String> {
+ let host_tools = parent_args.host_tools.all();
let mut out: Vec<String> = Vec::with_capacity(tools.len());
for tool in tools {
- let wire = parent_args
- .host_tools
- .all()
- .iter()
- .find(|host| host.name == tool)
- .map_or(tool, |host| host.qualified_name.clone());
+ let is_wire = known.contains(&tool) || parent_args.host_tools.is_host_tool(&tool);
+ let wire = if is_wire {
+ tool
+ } else {
+ host_tools
+ .iter()
+ .find(|host| host.name == tool)
+ .map_or(tool, |host| host.qualified_name.clone())
+ };
if !out.contains(&wire) {
out.push(wire);
}
@@ -567,6 +577,7 @@ fn qualify_host_names(
#[cfg(not(feature = "cli"))]
fn qualify_host_names(
tools: Vec<String>,
+ _known: &[String],
_parent_args: &crate::core::agent::r#loop::OrchestrationArgs,
) -> Vec<String> {
tools
@@ -1256,6 +1267,12 @@ pub(crate) struct ParentRun {
/// tools are no exception here, since they are Jan's and the session
/// excluded Jan's tools.
pub(crate) tool_ceiling: Option<Vec<String>>,
+ /// Every non-host tool name the parent could reach: all MCP and plugin
+ /// tools before plan mode, an allowlist or a deny rule filtered them, plus
+ /// what it was offered. A child asking for one of these by its exact name
+ /// means that tool, never a host tool declared under the same bare name --
+ /// even when the parent's filter then keeps the child from getting it.
+ pub(crate) known_tools: Vec<String>,
}
/// The model a dispatch will actually be billed for: the definition's own when
@@ -1536,7 +1553,7 @@ pub(crate) fn spawn_subagent(
let resolved = ResolvedDispatch {
allowed_tools: capped_tools(
resolved.allowed_tools,
- parent.tool_ceiling.as_deref(),
+ parent,
&req.name,
parent_args,
)?,
@@ -1775,7 +1792,7 @@ pub(crate) fn spawn_dispatch_plan(
let resolved = resolve_dispatch(&registry, req, &parent_args.permissions)?;
capped_tools(
resolved.allowed_tools.clone(),
- parent.tool_ceiling.as_deref(),
+ parent,
&req.name,
parent_args,
)?;
@@ -2799,6 +2816,7 @@ mod tests {
send_reasoning: true,
cost_remaining: None,
tool_ceiling: None,
+ known_tools: Vec::new(),
}
}
@@ -3297,40 +3315,83 @@ mod tests {
tools.iter().map(|t| (*t).to_string()).collect()
}
+ /// A dispatching run with `ceiling` and `known` tools, the rest defaulted.
+ #[cfg(feature = "cli")]
+ fn run_with(ceiling: Option<&[&str]>, known: &[&str]) -> ParentRun {
+ ParentRun {
+ tool_ceiling: ceiling.map(names),
+ known_tools: names(known),
+ ..parent_run()
+ }
+ }
+
/// The model names a host tool the way the host's prompt does. Under no
/// ceiling (a session with built-ins) that name used to reach the child's
/// allowlist unchanged, match nothing, and leave it only the skill tools.
#[cfg(feature = "cli")]
#[test]
fn a_declared_host_name_resolves_to_its_wire_name() {
- let parent = host_parent();
- let arm = parent.host_tools.all()[1].qualified_name.clone();
+ let args = host_parent();
+ let arm = args.host_tools.all()[1].qualified_name.clone();
assert_ne!(arm, "host__arm.move", "a dotted name is mapped");
let out = capped_tools(
Some(names(&["observe", "arm.move", "host__observe", "skill_read"])),
- None,
+ &run_with(None, &[]),
"probe",
- &parent,
+ &args,
)
.unwrap();
assert_eq!(out, Some(vec!["host__observe".to_string(), arm, "skill_read".to_string()]));
}
+ /// A name the parent knows keeps its meaning, even when a host also
+ /// declared that string as a bare name: `host__observe` stays the tool the
+ /// host called `observe` (not the one it called `host__observe`), and a
+ /// host tool called `search` does not take over the MCP tool `search` --
+ /// even under a ceiling that filtered `search` out, where the child is
+ /// then refused it rather than handed the host's.
+ #[cfg(feature = "cli")]
+ #[test]
+ fn an_exact_wire_name_wins_over_a_colliding_bare_name() {
+ let root = unique_root("capped-tools-collide");
+ let mut args = max_par_args(&root);
+ args.host_tools = crate::core::agent::host_tools::HostToolSet::declare(
+ ["observe", "host__observe", "search"]
+ .map(|name| serde_json::from_value(serde_json::json!({ "name": name })).unwrap())
+ .into(),
+ )
+ .unwrap();
+ // `search` is an MCP tool, on the wire under its bare name.
+ let known = ["search"];
+ let out = capped_tools(
+ Some(names(&["host__observe", "search", "observe"])),
+ &run_with(None, &known),
+ "probe",
+ &args,
+ )
+ .unwrap();
+ assert_eq!(out, Some(names(&["host__observe", "search"])));
+
+ // The parent's filter dropped `search` (plan mode, an allowlist, a
+ // deny rule): the host's `search` still does not stand in for it.
+ let ceiling = ["host__observe", "host__host__observe", "host__search"];
+ let err = capped_tools(Some(names(&["search"])), &run_with(Some(&ceiling), &known), "probe", &args)
+ .unwrap_err();
+ assert!(matches!(err, SubagentError::PermissionDenied(_)), "{err}");
+ }
+
/// Under a ceiling a child is never offered more than its parent: no
/// allowlist inherits the ceiling, not Jan's whole set, and a list is
/// narrowed to it, forced skill tools included.
#[cfg(feature = "cli")]
#[test]
fn a_child_is_held_to_the_parents_ceiling() {
- let parent = host_parent();
- let ceiling = names(&["dispatch_subagent", "host__observe"]);
- assert_eq!(
- capped_tools(None, Some(&ceiling), "probe", &parent).unwrap(),
- Some(ceiling.clone())
- );
+ let args = host_parent();
+ let ceiling = ["dispatch_subagent", "host__observe"];
+ let run = run_with(Some(&ceiling), &[]);
+ assert_eq!(capped_tools(None, &run, "probe", &args).unwrap(), Some(names(&ceiling)));
assert_eq!(
- capped_tools(Some(names(&["observe", "bash", "skill_list"])), Some(&ceiling), "probe", &parent)
- .unwrap(),
+ capped_tools(Some(names(&["observe", "bash", "skill_list"])), &run, "probe", &args).unwrap(),
Some(names(&["host__observe"]))
);
}
@@ -3340,9 +3401,9 @@ mod tests {
#[cfg(feature = "cli")]
#[test]
fn a_list_the_ceiling_keeps_nothing_of_is_refused() {
- let parent = host_parent();
- let ceiling = names(&["host__observe"]);
- let err = capped_tools(Some(names(&["bash"])), Some(&ceiling), "probe", &parent).unwrap_err();
+ let args = host_parent();
+ let run = run_with(Some(&["host__observe"]), &[]);
+ let err = capped_tools(Some(names(&["bash"])), &run, "probe", &args).unwrap_err();
let message = err.to_string();
assert!(matches!(err, SubagentError::PermissionDenied(_)), "{message}");
assert!(message.contains("host__observe") && message.contains("probe"), "{message}");
diff --git a/src-tauri/src/core/cli/rpc_schema.rs b/src-tauri/src/core/cli/rpc_schema.rs
index a5ca72d69..f2e567a29 100644
--- a/src-tauri/src/core/cli/rpc_schema.rs
+++ b/src-tauri/src/core/cli/rpc_schema.rs
@@ -45,7 +45,8 @@ pub struct SessionStartParams {
#[schemars(with = "Vec<HostToolDeclSchema>")]
pub tools: Vec<serde_json::Value>,
/// `false` advertises only the host tools: no built-ins, MCP, plugin,
- /// `ask`, `todo`, subagent or monitor tools.
+ /// `ask`, `todo` or monitor tools. `subagents: true` adds back only
+ /// `dispatch_subagent` and `list_subagents`.
#[serde(default = "builtins_default")]
pub builtins: bool,
/// Whether the session may delegate to subagents; defaults to `builtins`.
@@ -56,7 +57,9 @@ pub struct SessionStartParams {
pub subagents: Option<bool>,
/// The session's whole system prompt, sent byte for byte in place of the
/// one Jan composes: no Jan identity, guides, environment, date, git state
- /// or project memory. Children keep their own prompts.
+ /// or project memory, and the session neither recalls nor indexes project
+ /// memory. Jan may still append runtime notices to the conversation.
+ /// Children keep their own prompts.
#[serde(default)]
pub system_prompt: Option<String>,
#[serde(default)]