will.anderson 7c7dc310a0
Neuron Soul CI / build (pull_request) Failing after 11m26s
fix(sessions): unify dual suspension systems in handle_session_approve
The approve endpoint was permanently broken for all sessions going through
the modern agentic_loop path. agentic_loop suspends via bridge_save() into
mcp_bridge:<session_id>, but handle_session_approve was reading from
pending_tool_<session_id> — a different key — so it always returned
"no pending tool for session".

Replace the body of handle_session_approve with a two-path design:

Modern path: check mcp_bridge:<session_id> first. If the blob is there,
dispatch_tool() on allow (or build the denial string), then delegate to
agentic_resume() which re-enters agentic_loop from the exact suspension
point. This is the path all live sessions take.

Legacy path: if only pending_tool_<session_id> exists (in-flight session
from before this deploy), synthesise a bridge blob from the stored
messages_so_far and route through agentic_resume() as well. The stale
inline agentic loop (90 lines, agentic_tools_literal only, no MCP
connector support, no bridge suspension) is removed entirely.

routes.el already calls handle_session_approve correctly — no change needed.
2026-06-15 13:03:15 -05:00
S
Description
Neuron - the canonical CGI substrate. Real soul.el lives here.
14 MiB
Languages
Emacs Lisp 89.1%
Python 4.8%
Shell 2.5%
HTML 1.9%
Dockerfile 1.7%