Skip to content

Add Command Code to Reason Network - #156

Merged
svemyh merged 1 commit into
mainfrom
reason/command-code-feedback
Oct 28, 2026
Merged

svemyh merged 1 commit into
mainfrom
reason/command-code-feedback

Conversation

@reason-machines

@reason-machines reason-machines Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Why

Command Code's documented stdio MCP and hook support provides a direct integration path. This adds Command Code as a connected Reason Network agent rather than instructions for a hosted MCP connection. The MCP docs and Hooks docs define the config locations and hook contracts used here.

What changed

  • Register a user-scoped stdio server and the documented SessionStart, PostToolUse, and Stop hooks.
  • Map Command Code client names and link its MCP server to the session registered by its hooks.
  • Preserve unrelated MCP and hook settings, and remove only Reason Network's entries.

Scope

  • Covers only the Command Code integration. The Linux desktop app and pt-BR translation remain out of scope.
  • The Command Code CLI is not installed in this environment. Setup tests use a fake cmd executable, and behavioral tests run the actual Reason Network stdio server against documented client and hook payloads.
  • No screenshots apply to this CLI and configuration change.

Blast Radius

The changes add a cmd path to agent registration, session identification, and hook output. The existing adapters remain unchanged and pass the same suite.

Verification

  • cargo fmt --all --check with the isolated stable toolchain on PATH. Passed.
  • cargo clippy --all-targets --locked -- -D warnings. Passed.
  • cargo test --locked. 256 tests passed.
  • cargo build --locked && TMPDIR=/tmp python3 tests/e2e/hooks.py. All 82 hook checks passed, including Command Code setup, removal, discovery, MCP session linking, Stop, and PostToolUse.
  • python3 -m py_compile tests/e2e/hooks.py and git diff --check. Passed.
  • Independent read-only review of the exact PR head: no blocking findings.

—
Feedback resolver

Open in Reason

@reason-machines
reason-machines Bot marked this pull request as ready for review October 26, 2026 06:50
@reason-machines
reason-machines Bot requested a review from larstalian October 26, 2026 06:51

@svemyh svemyh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security review of 9fdb584: no new attack surface. Setup writes only Reason Network's entries into ~/.commandcode/{mcp,settings}.json, preserves the rest, hook command uses the existing shell_cmd quoting, and message delivery follows the Codex/Gemini adapter path. Non-blocking: on Unix, if Command Code's process comm is literally cmd, hook_agent_pid skips it as a shell and keys the session link to the terminal/tmux ancestor (two Command Code sessions there could swap mail); find_bin("cmd") is a generic name. Untested against the real CLI.

@svemyh
svemyh merged commit 29a96dc into main Oct 28, 2026
8 checks passed
@svemyh
svemyh deleted the reason/command-code-feedback branch October 28, 2026 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant