fix: expose Hermes MCP tools to Codex workers - #31279
Conversation
bc2eaaf to
722e2ac
Compare
|
Rebased onto the latest This one is generic and not fork-specific: it exposes Hermes' own MCP tools ( |
|
Pushed a follow-up hardening commit:
89 tests pass across the affected files. Note the |
…, tests Addresses review feedback on the bridge: - Add HERMES_KANBAN_WORKER_MCP runtime escape hatch (default on) to disable the injected hermes-tools MCP override without a code change. - Document the intentional, guarded FastMCP _tool_manager access and replace the silent schema-pin swallow with debug logging; log the public-add_tool fallback. - Tests: gate returns [] without HERMES_KANBAN_TASK and when disabled; env allowlist does not forward non-allowlisted secrets and sets the safety defaults; direct unit test of _signature_from_json_schema (the mechanism that fixes Codex sending empty arg dicts), incl. the non-identifier edge case. - Docs: note the disable flag and the fixed env allowlist. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
8876377 to
f16008f
Compare
|
Local validation from another Hermes Kanban/Codex app-server setup:\n\n- Checked this PR against the exact issue we hit with Codex app-server Kanban workers lacking reliable native lifecycle tools.\n- Checked out the PR branch locally and ran the targeted suites:\n - |
|
Thanks for tracing the missing Codex-worker lifecycle path and adding focused schema coverage. Current main still constructs the Codex client without per-task MCP overrides ( Problems
Suggested changes
Automated hermes-sweeper review. |
Related to #52493 and #66170, not a duplicate: this branch injects per-worker MCP configuration and uses synthetic callable signatures for dynamic schemas, whereas those PRs address the persisted migration context and private schema-override mechanisms respectively. |
Summary
hermes-toolsMCP server config into Codex app-server Kanban worker sessions.HERMES_KANBAN_TASK, board, DB, workspace, profile, etc.) into that MCP subprocess sokanban_show,kanban_complete, andkanban_blockare actually exposed.skill_view(name=...)and Kanban tools receive named arguments instead of an emptykwargsshape.Why
Codex app-server workers could perform shell/file work but finish with prose because Hermes' Kanban lifecycle tools were missing or malformed in the MCP tool surface. This made the dispatcher block tasks with
external-runtime-proseeven when the worker had done useful work.Verification
git diff --cached --check/Users/stefans/git/hermes-agent/venv/bin/python -m pytest tests/agent/transports/test_codex_app_server_session.py tests/agent/transports/test_hermes_tools_mcp_server.py tests/run_agent/test_codex_app_server_integration.py -q -o addopts=''kanban_show,kanban_complete,kanban_block, andskill_view'snameschema are presentkanban_blockwisbric-coreparent tasks; both completed withkanban_complete