luigidemasi opened a new issue, #26: URL: https://github.com/apache/camel-kit/issues/26
> Imported from [luigidemasi/camel-kit#47](https://github.com/luigidemasi/camel-kit/issues/47), opened by [luigidemasi](https://github.com/luigidemasi) on 2026-05-05. > Closed on 2026-05-06 without a linked pull request. --- ## Description IBM Bob lacks a native subagent dispatch mechanism (unlike Claude Code's `Agent` tool, Gemini's named agent delegation, or Qwen's `task` tool). All work runs sequentially in a single 200K-token context window, causing context pollution and exhaustion during heavy pipeline phases (`/camel-execute`, `/camel-validate`). Independent routes cannot be implemented in parallel. ## Proposed Solution ### New module: `camel-kit-dispatch` A Quarkus MCP server module (consistent with `camel-kit-knowledge/mcp`) exposing three tools: - **`dispatch_subagent`** — Dispatch a single task to a fresh Bob Shell process with isolated context - **`dispatch_parallel`** — Dispatch multiple tasks to concurrent Bob Shell processes - **`dispatch_status`** — Check the status of a running or completed dispatch ### Core mechanism A "new context" is a new OS process. Each dispatch spawns a new `bob` process via `ProcessBuilder`: ``` bob "task prompt" --chat-mode code --output-format json --hide-intermediary-output --approval-mode auto_edit ``` The MCP server captures the JSON output, detects file changes via `git diff`, and returns a compact summary (~200 tokens) to the parent Bob session. All intermediate reasoning, tool calls, and code generation stay in the subagent's context — the parent never sees them. ### Permission model (two-layer) 1. **Parent approval:** User approves the dispatch MCP tool call (intent approval) 2. **Subagent scoping:** Each subagent runs with permissions based on task type: - `auto_edit` — file edits only (route implementation) - `yolo` — full autonomy (build/test verification) - `read_only` via `--allowed-tools` — no modifications (validation/review) This is more secure than the current single-session model where Bob runs everything in `advanced` mode with full permissions. ### Integration - **Bob-only:** The `camel-dispatch` MCP server is configured exclusively in `.bob/mcp.json` by `BobGenerator`. Other agents have native dispatch mechanisms and do not need it. - **Trait update:** The Bob execute trait is updated with dispatch instructions and orchestrator role definition. - **Parallel routes:** Graph topology (`camel-kit graph route-topology`) identifies independent routes for `dispatch_parallel`. ### Cross-agent dispatch symmetry | Agent | Native Dispatch | Bob Dispatch Equivalent | |---|---|---| | Claude Code | `Agent` tool | `dispatch_subagent` MCP tool | | Gemini | Named agent delegation | `dispatch_parallel` MCP tool | | Qwen | `task` tool (serial) | `dispatch_subagent` (sequential) | | OpenCode | Typed agents | N/A | ## Expected Impact - ~5-6x reduction in total tokens processed for multi-route migrations (each subagent processes ~15K tokens vs ~120K in a bloated single session) - Parallel route implementation matching Claude Code's capability - Reduced Bobcoin costs (smaller contexts = cheaper per-query processing) - Principle of least privilege: each subagent gets only the permissions its task requires -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
