Bug Report
Version: cortex v0.0.7
Command: cortex acp --allow-tool <tool> --deny-tool <tool>
Description
The --allow-tool (whitelist) and --deny-tool (blacklist) flags for cortex acp are advertised in help text to restrict which tools the ACP server makes available to the agent. However, these flags are completely ignored — they are only printed to stderr but never applied to the server configuration.
Steps to Reproduce
$ cortex acp --port 19876 --allow-tool read --deny-tool execute 2>&1 | head -4
Tool whitelist: ["read"]
Tool blacklist: ["execute"]
Starting ACP server on http://127.0.0.1:19876
INFO cortex_engine::acp::server: Starting ACP server on http://127.0.0.1:19876
Expected Behavior
The ACP server should only expose the read tool (whitelist) and block the execute tool (blacklist) from the agent's available tools.
Actual Behavior
The tool lists are printed to stderr but not applied. All tools remain available regardless of --allow-tool/--deny-tool flags.
Screenshot (real binary output)

Root Cause
In src/cortex-cli/src/acp_cmd.rs, the run() function uses eprintln!() to print the tool lists, but never applies them to config:
if !self.allow_tools.is_empty() {
eprintln!("Tool whitelist: {:?}", self.allow_tools);
// Note: Tool restrictions are passed via server configuration
// BUG: config is never updated with allow_tools!
}
if !self.deny_tools.is_empty() {
eprintln!("Tool blacklist: {:?}", self.deny_tools);
// Note: Tool restrictions are passed via server configuration
// BUG: config is never updated with deny_tools!
}
// Server is started with unmodified config:
let server = cortex_engine::acp::AcpServer::new(config);
The config object is built earlier and the tool restriction lists (self.allow_tools, self.deny_tools) are never set on it before passing to AcpServer::new().
File: src/cortex-cli/src/acp_cmd.rs, run() function (~line 88)
Bug Report
Version: cortex v0.0.7
Command:
cortex acp --allow-tool <tool> --deny-tool <tool>Description
The
--allow-tool(whitelist) and--deny-tool(blacklist) flags forcortex acpare advertised in help text to restrict which tools the ACP server makes available to the agent. However, these flags are completely ignored — they are only printed to stderr but never applied to the server configuration.Steps to Reproduce
Expected Behavior
The ACP server should only expose the
readtool (whitelist) and block theexecutetool (blacklist) from the agent's available tools.Actual Behavior
The tool lists are printed to stderr but not applied. All tools remain available regardless of
--allow-tool/--deny-toolflags.Screenshot (real binary output)
Root Cause
In
src/cortex-cli/src/acp_cmd.rs, therun()function useseprintln!()to print the tool lists, but never applies them toconfig:The
configobject is built earlier and the tool restriction lists (self.allow_tools,self.deny_tools) are never set on it before passing toAcpServer::new().File:
src/cortex-cli/src/acp_cmd.rs,run()function (~line 88)