claude_cli: codemode for claude #167

Merged
hermes merged 1 commits from feat/claude-cli-codemode into main 2026-10-16 20:44:25 +00:00
Collaborator

With codemode = true and the claude CLI backend, hx mcp-serve also exposes the codemode tool (claude sees it as mcp__hx__codemode). Scripts can call hx's tools (read/write/edit/bash/grep/..., web, MCP servers, lsp). claude keeps its own built-in tools. Permissions: bash/write/edit/web_fetch/secret reads called from a script ask like any hx tool; mcp-serve forwards the question over the existing permission socket (approve::remote_permit) to the TUI, no socket = deny. Env HX_CODEMODE=1 switches it on in the mcp-serve child. Tests: remote_permit allow/deny/no-socket unit test; claude_cli e2e runs a codemode script through mcp-serve (fake claude). Real claude not tested. Note: mcp-serve now starts the MCP hub when codemode is on (slower claude start).

With `codemode = true` and the claude CLI backend, `hx mcp-serve` also exposes the `codemode` tool (claude sees it as mcp__hx__codemode). Scripts can call hx's tools (read/write/edit/bash/grep/..., web, MCP servers, lsp). claude keeps its own built-in tools. Permissions: bash/write/edit/web_fetch/secret reads called from a script ask like any hx tool; mcp-serve forwards the question over the existing permission socket (`approve::remote_permit`) to the TUI, no socket = deny. Env HX_CODEMODE=1 switches it on in the mcp-serve child. Tests: remote_permit allow/deny/no-socket unit test; claude_cli e2e runs a codemode script through mcp-serve (fake claude). Real claude not tested. Note: mcp-serve now starts the MCP hub when codemode is on (slower claude start).
hermes added 1 commit 2026-10-16 20:42:11 +00:00
hermes merged commit d69c56b3c8 into main 2026-10-16 20:44:25 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johannes/hx#167