To allow CLI sub-agents spawned via sub_query to access the same live Aleph session (including tools, contexts, and sandbox state), enable streamable HTTP sharing. This spins up a local HTTP endpoint that the nested CLI points to automatically.
Key configuration options for shared sessions:
--sub-query-backend: Set to codex for shared sessions.--sub-query-share-session: Set to true.--sub-query-codex-mode: Set to mcp to allow Aleph to talk to codex mcp-server instead of codex exec.--sub-query-codex-model: Specify the model (e.g., gpt-5.4).--sub-query-codex-reasoning-effort: Specify effort (e.g., low).
Note: Tools are exposed under the server name aleph_shared to avoid conflicts with existing aleph entries.
{
"mcpServers": {
"aleph": {
"command": "aleph",
"args": [
"--enable-actions",
"--workspace-mode", "any",
"--tool-docs", "concise",
"--sub-query-backend", "codex",
"--sub-query-share-session", "true",
"--sub-query-timeout", "300",
"--sub-query-codex-mode", "mcp",
"--sub-query-codex-model", "gpt-5.4",
"--sub-query-codex-reasoning-effort", "low"
]
}
}
}