fix(chat): wire agentic_tools_all into both agentic loop entry points #19

Open
will.anderson wants to merge 1 commits from fix/agentic-tools-all into main
Owner

Problem

In handle_chat_agentic, tools_json was set to agentic_tools_with_web() which includes built-in tools and web_search but not MCP connector tools. Users in agentic mode could never call any mcp__* tool even when neuron-connectd is running.

handle_dharma_room_turn_agentic had the same problem (agentic_tools_literal()) plus an inline copy of the 8-iteration agentic loop that lacked bridge suspension support.

Changes

  • handle_chat_agentic (line 579): agentic_tools_with_web()agentic_tools_all()
  • handle_dharma_room_turn_agentic: agentic_tools_literal()agentic_tools_all(), inline loop replaced with agentic_loop() call, room_id extracted from body for dharma-scoped session IDs (dharma:<room_id>) so bridge suspension works per-room

agentic_tools_all() calls connector_tools_json() internally, which returns [] if neuron-connectd is not running, so this is safe when the bridge is down.

Test plan

  • Verify mcp__neuron__* tools are available in agentic chat when neuron-connectd is running
  • Verify agentic chat still works normally when neuron-connectd is not running (falls back to built-ins)
  • Verify dharma room agentic turns complete correctly and tools_used is populated in response
## Problem In `handle_chat_agentic`, `tools_json` was set to `agentic_tools_with_web()` which includes built-in tools and web_search but **not** MCP connector tools. Users in agentic mode could never call any `mcp__*` tool even when `neuron-connectd` is running. `handle_dharma_room_turn_agentic` had the same problem (`agentic_tools_literal()`) plus an inline copy of the 8-iteration agentic loop that lacked bridge suspension support. ## Changes - `handle_chat_agentic` (line 579): `agentic_tools_with_web()` → `agentic_tools_all()` - `handle_dharma_room_turn_agentic`: `agentic_tools_literal()` → `agentic_tools_all()`, inline loop replaced with `agentic_loop()` call, `room_id` extracted from body for dharma-scoped session IDs (`dharma:<room_id>`) so bridge suspension works per-room `agentic_tools_all()` calls `connector_tools_json()` internally, which returns `[]` if `neuron-connectd` is not running, so this is safe when the bridge is down. ## Test plan - [ ] Verify `mcp__neuron__*` tools are available in agentic chat when neuron-connectd is running - [ ] Verify agentic chat still works normally when neuron-connectd is not running (falls back to built-ins) - [ ] Verify dharma room agentic turns complete correctly and tools_used is populated in response
will.anderson added 1 commit 2026-06-15 18:07:21 +00:00
fix(chat): wire agentic_tools_all into agentic loop paths
Neuron Soul CI / build (pull_request) Failing after 12m20s
773004f23b
handle_chat_agentic was calling agentic_tools_with_web(), which omits
MCP connector tools, so mcp__* calls were never available in agentic
mode even when neuron-connectd is running.

Switch both agentic entry points to agentic_tools_all(). For
handle_dharma_room_turn_agentic, also replace the inline 8-iteration
loop with a call to agentic_loop() so bridge suspension and the full
connector tool set work consistently. Session IDs are prefixed with
'dharma:' + room_id so suspensions stay room-scoped.
Some required checks failed
Neuron Soul CI / build (pull_request) Failing after 12m20s
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/agentic-tools-all:fix/agentic-tools-all
git checkout fix/agentic-tools-all
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: neuron-technologies/neuron#19