fix(routes): remove duplicate GET /api/sessions shadowing session_list() #64

Open
tim.lingo wants to merge 0 commits from green/agentic-fixes into main
Member

Local-only branch surfaced for review (was never pushed). Net-new change vs main is one fix:

  • fix(routes): remove a duplicate GET /api/sessions that shadowed session_list()

The branch also carries merge commits of already-merged work (fix/sessions-route-dedup, fix/agentic-tools-all) and one commit already in main (bridge raw-JSON storage) — so the effective diff is just the route-dedup fix. Mergeable clean. Opening per Tim's request.

🤖 Generated with Claude Code

Local-only branch surfaced for review (was never pushed). Net-new change vs main is one fix: - fix(routes): remove a duplicate GET /api/sessions that shadowed session_list() The branch also carries merge commits of already-merged work (fix/sessions-route-dedup, fix/agentic-tools-all) and one commit already in main (bridge raw-JSON storage) — so the effective diff is just the route-dedup fix. Mergeable clean. Opening per Tim's request. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
tim.lingo added 4 commits 2026-06-30 18:53:15 +00:00
The first registration called route_sessions() which searched for a
'session-start' label that no longer exists, returning an empty array
on every list request and making the sidebar appear empty after restart.
The second registration (dead code) called the correct session_list().

Removes route_sessions() entirely and the stale first route block.
Also wires up session_delete() and session_update_patch() — both existed
in sessions.el but had no HTTP routes — via new DELETE and PATCH blocks.
bridge_save was wrapping messages and tools_json with json_safe() before
storing them as string fields. Since both are already well-formed JSON arrays
containing double quotes, json_safe added a second escape layer. agentic_resume
then called json_get() which stripped only one layer, leaving the messages array
corrupted before it was passed back into agentic_loop.

Fix: store messages as messages_raw and tools_json as tools_raw as inline raw
JSON values (unquoted), and read them back with json_get_raw. Backward
compatibility: fall back to the old string-escaped fields if the raw fields are
absent, so sessions saved before this fix can still be resumed.

Also fixes write_file returning a pre-escaped literal instead of calling
json_safe consistently with every other tool result.
Some required checks failed
Neuron Soul CI / build (pull_request) Failing after 6m0s
This branch is already included in the target branch. There is nothing to merge.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin green/agentic-fixes:green/agentic-fixes
git checkout green/agentic-fixes
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#64