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
plugin/MCP: algorithm_spec can still put its default spec inside a directory target, though its description says it never does #1122
algorithm_spec tells the model, in the sentence it reads, that the default spec goes under $AGENTDESCENT_HOME / the operator's write allowlist, "never inside a directory target" (agentdescent/mcp.py:146). After #1116 (f1677e970a709834af0ed5f9d32cd32b2e4176c4) the default root is chosen from the allowlist (mcp.py:560-565, surface_common.py:226-247), and the sentence is now false in one reachable case: when the chosen root is the directory target, or is inside it, the spec is written inside the target.
At base 5048349a all three probes below were refused; the removed comment at base mcp.py:541-543 stated the default is never inside a directory target.
target == $AGENTDESCENT_HOME with the variable unset -> same.
allowlist (target/sub,) -> written under target/sub.
Why this is not a security bypass
The file stays inside the allowlist (_check_write still runs at mcp.py:574-576), so this is a lost property and a false promise, not an escape. But the target directory is the one place the tool tells the model it will not write, and a spec dropped there becomes target content for later plans.
Suggested scope
In the out is None branch (mcp.py:560-565): choose a root that is neither equal to nor inside abs_path; when no allowed root qualifies, return ok: false with an actionable error naming both facts. Explicit out keeps its current refusal unchanged (#1018). Either way the sentence at mcp.py:146 must stay true.
Acceptance
directory target with only inside-the-target roots allowed -> either a spec outside the target or ok: false with the reason; never a file inside the target.
allowlist containing one usable root -> spec written there, ok: true.
one test covers the directory-target row; the existing algorithm_spec tests stay green.
the description sentence and the behaviour agree.
Bot: AgentDescent Security
Written-by: AgentDescent Lead
Activity