You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Conversational agent routing: one tool-calling co-pilot (answer-from-context vs delegate-to-Claude) #3
The coding Agent chat has TWO explicit buttons — Send (always relays to Claude Code, expensive + side-effecting) and Status (always answers from context, cheap, read-only). That split is clunky: users shouldn't have to pre-classify their own message.
Approach (researched best practice)
Collapse to ONE chat backed by a single cheap co-pilot LLM running a tool-calling loop with three tools:
answer_from_context — default; it already holds the terminal + recent history.
search_history(query) — vector/semantic search over coding_timeline, on-demand (only when the question reaches past the in-window history). Not always-on context.
drive_claude(instruction) — the expensive, side-effecting delegation to Claude Code (the existing /message path); its "result" streams back into the same thread.
The LLM decides per message. No code words, no separate intent-classifier (only justified at hundreds of tools). This is the orchestrator-worker pattern Anthropic recommends for coding.
Prompt disposition: context-first, delegate on action — anything that changes files / runs commands / needs live repo state → drive_claude; otherwise describe from context.
Scope
Backend: turn /explain (or a new /agent) into a tool-calling loop (reuse BYOK Claude + the tool-loop machinery from the apply pipeline); add drive_claude (→ /coding/act) and search_history (→ coding_timeline + vectors) tools.
Frontend: fold Send + Status into one input; keep a thin /run or @claude override to force delegation.
Guard against
Under-delegation (cheap LLM answers a question it should have delegated) → hard prompt rule on action intent.
Over-delegation (wastes Claude on a status question) → make context-answer first-class.
Loop thrash → cap rounds + dedup identical tool calls (reuse existing 3-round cap).
Acceptance
One chat input. Typing "what's it doing?" answers from context; "add a test" drives Claude. @claude <x> always delegates. No double LLM cost on pure status questions.
Superseded-by / rolls up into the Overseer agent (one cross-repo conversational AI). This per-session routing (answer-from-context vs drive_claude) is the reusable tool-loop CORE; the Overseer lifts it to global scope with all-repos context + memory. Build this loop first, then generalise.
Closing as implemented against the ticket's user-facing acceptance. Current code has the single coding chat route at /v1/instances/:instanceId/coding/sessions/:sessionId/agent, force-delegation via @claude//run, and the drive_claude tool path; the Coder UI sends normal turns to that single /agent input. Note: the originally proposed search_history tool did not land as a separate tool; if deeper semantic history search is still needed, it should be a narrower follow-up rather than keeping this broad routing ticket open.
Activity
serge-ivo commentedon Jun 26, 2026
Superseded-by / rolls up into the Overseer agent (one cross-repo conversational AI). This per-session routing (answer-from-context vs drive_claude) is the reusable tool-loop CORE; the Overseer lifts it to global scope with all-repos context + memory. Build this loop first, then generalise.
feat(coding): #3 Step 1 — one smart Agent input (answer from context …
serge-ivo commentedon Aug 6, 2026
Closing as implemented against the ticket's user-facing acceptance. Current code has the single coding chat route at /v1/instances/:instanceId/coding/sessions/:sessionId/agent, force-delegation via @claude//run, and the drive_claude tool path; the Coder UI sends normal turns to that single /agent input. Note: the originally proposed search_history tool did not land as a separate tool; if deeper semantic history search is still needed, it should be a narrower follow-up rather than keeping this broad routing ticket open.
serge-ivo commentedon Aug 6, 2026
Implementation links: no associated PR was found via GitHub's commit-to-PR API; this landed direct on main in 6127186.