session_open
Open or reuse an Agent Bridge hosted Pi or Claude session by directory and purpose; create and register a new one when no live session exists.
Instructions
get-or-create:按 (engine, cwd, purpose) 查登记册;命中且会话还在就复用,否则用 hosted.create 新建(非空启动偏好显式传;空值不传,交给 CLI 默认),自动打 MCP 标签、标题 MCP · ,并写入登记册。cwd 必须在 bridge 托管白名单内(远程设备不能 addDir)。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cwd": "<cwd>",
"purpose": "<purpose>"
},
"name": "session_open"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | bridge 托管白名单内的绝对路径(本机 agent 的工作目录) | |
| model | No | 主模型;缺省取 profile.model | |
| title | No | 可选:覆盖默认标题 MCP · <purpose> | |
| engine | No | 托管引擎;缺省取 profile.engine | |
| purpose | Yes | 用途线短名,同一 (engine,cwd,purpose) 复用同一会话 | |
| thinking | No | 主思考等级;缺省取 profile.thinking | |
| subagentModel | No | 子代理模型;缺省取 profile.subagentModel | |
| subagentThinking | No | 子代理思考等级;缺省取 profile.subagentThinking |