feat: deployment-level no_shell policy (agents.yaml no_shell: true)
#3
Reference in New Issue
Block a user
Delete Branch "feat/no-shell-config"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Adds a team-level opt-out of fast-agent's shell tool:
_fastagent_patch.install_no_shell()— wrapsfast_agent.context.initialize_contextto stampno_shell = Trueon every context it returns. Idempotent, house patch style. Not part ofinstall()— this is deployment policy, not a runtime fix.server.main()— calls it (aftersetup_logging(), so the install record isn't lost) when the deployment'sagents.yamlhas a truthy top-levelno_shell:key.Why
fast-agent auto-activates its
executeshell tool on any agent that has skills configured (MCPAgent._ensure_shell_runtime_for_skills); theaccess_modes=("skills",)label on that activation is display-only, not a sandbox. The only opt-out isContext.no_shell, which fast-agent's own CLI sets by direct assignment but which has noFastAgent-constructor or config-file knob — and the context is created insiderun()before agents are constructed, hence the wrapper.Skill loading is unaffected:
read_skill(pure-Python, path-validated file reader) registers independently of the shell. Verified against both dev fast-agent 0.7.21 and the pinned 0.7.15.First consumer: iolaus (
no_shell: truelands with r/iolaus's piano-coach skill PR — merge this one first, iolaus deployspallas_rel: main). Deployments without the key are unchanged.Verified
read_skillpresent, noexecutetool,<available_skills>rendered.no_shell patch installedonce; no shell-activation notice.🤖 Generated with Claude Code