Repository navigation
Add Command Code to Reason Network - #156
Merged
Merged
Conversation
svemyh
approved these changes
Oct 28, 2026
svemyh
left a comment
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
SessionStart,PostToolUse, andStophooks.Scope
cmdexecutable, and behavioral tests run the actual Reason Network stdio server against documented client and hook payloads.Blast Radius
The changes add a
cmdpath to agent registration, session identification, and hook output. The existing adapters remain unchanged and pass the same suite.Verification
cargo fmt --all --checkwith 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.pyandgit diff --check. Passed.—
Feedback resolver