grok_session_switch
Switch to a new Grok session when project path, working directory, or Git branch changes, preventing reuse of outdated context.
Instructions
当项目路径、工作目录或 Git 分支发生变化时调用,为新的上下文切换到独立的 Grok 会话,避免复用不相关的旧上下文。
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": {
"codex_task_id": "<codex_task_id>",
"project_root": "<project_root>"
},
"name": "grok_session_switch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | No | ||
| project_root | Yes | ||
| codex_task_id | Yes | ||
| open_observer | No | ||
| working_directory | No |