You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] AGENT_EMERGENCY_STOP does not block several mutating tools #70
AGENT_EMERGENCY_STOP=true is supposed to disable mutating operations. check_emergency_stop_for_tool() only inspects MUTATING_AGENT_TOOLS. That set is missing tools that change infrastructure or open PRs:
create_github_pr
retry_cicd_pipeline
create_cicd_pr
restart_cloud_resource
scale_cloud_service
With the kill switch on, the agent can still retry pipelines, open fix PRs, restart VMs, and scale services.
Steps to Reproduce
Set AGENT_EMERGENCY_STOP=true.
Call agent.execute_tool("retry_cicd_pipeline", {...}) or "restart_cloud_resource" / "create_github_pr".
Observe the tool running instead of returning {"blocked": true, "emergency_stop": true}.
Expected Behavior
Every mutating agent tool returns the emergency-stop block while the flag is set. Read-only tools (get_*, terraform_plan/validate, suggest_fix, notify_slack) remain allowed.
Actual Behavior
Only the names in MUTATING_AGENT_TOOLS are blocked:
restart_ec2_instance / scale_ecs_service are also stale names — the registered tools are restart_cloud_resource and scale_cloud_service, so even those AWS/GCP/Azure paths are not covered.
Additional Context
Issue #9 added the kill switch. execute_tool in agent/core.py consults check_emergency_stop_for_tool before dispatch. SafeExecutor still honors the flag for shell commands; the gap is the tool allow-list.
Possible Solution
Derive the mutating set from AGENT_TOOLS (or keep a complete list that matches registered names). Add a unit test that, with the flag on, every non-read-only tool returns emergency_stop: true.
Activity
Merge pull request #103 from Nitjsefnie-OSC/fix/auto-apply-host-mutat…
test(parser): pin the ERROR-id anchor and the no-error marker ladder