EONYX permissions and security: control over every action
An agent reads code, edits it and runs commands.
So it has to stay inside explicit permissions.
EONYX stacks several layers: a static gateway, a file sandbox, plan mode and a hard block on dangerous commands.
1 ๐ฆ The permission gateway
1.1 Static policy
Tools split in two.
Always allowed are the read-only ones.
Requiring permission are writes, commands, commits and MCP tools.
No questions asked for read, ls, glob, grep, git_status, git_diff, git_log, todo_write.
Everything else meets the gateway:
"permissions": {
"allowed_tools": ["bash", "write", "edit"],
"sandbox": true
}allowed_toolsโ tools that run without confirmation.sandboxโ locks the file tools inside the project root. More below.--yolo, or/yoloin the TUI โ allows everything for this session.
If a tool is not allowed and --yolo is off, the policy denies it: “permission denied for tool โฆ: re-run with –yolo or add โฆ to permissions.allowed_tools”.
The model sees the denial and adapts, usually by proposing another route.
The conversation stays consistent.
1.2 The interactive layer in the TUI
Interactive mode adds a dialog on top of the static policy.
When the policy refuses a tool, EONYX asks:
- Allow once โ this one time.
- Allow always (this session) โ until the session ends.
- Deny โ reject it. Esc means deny.
“Allow always” remembers the tool for the session, so it stops asking.
1.3 Plan mode
/plan is a stricter think-first gate.
While it is on, only read-only tools run: read, ls, glob, grep, picker, git_status, git_diff, git_log, fetch, task, todo_write.
Anything that writes or executes is blocked, regardless of allowed_tools and --yolo:
plan mode is on: “โฆ” is blocked until you approve the plan โ run /plan to exit plan mode and enable edits
When the plan is ready a dialog appears: implement, allow edits, or keep planning.
Handy when you want the agent to study the code and propose a plan before touching anything.
2 ๐งฑ Boundaries and guardrails
2.1 The file sandbox
permissions.sandbox: true locks read, write, edit, multi_edit and ls inside the project root.
That is the directory holding eonyx.json, or the working directory if there is none.
A path outside it is refused:
path “โฆ” is outside the project sandbox (โฆ); set permissions.sandbox to false to allow paths outside the project
The sandbox is off by default.
Turn it on for an untrusted task, or when you want a guarantee that nothing outside the project is touched.
Tools with no path argument are unaffected: bash, glob, grep, fetch and the git tools.
2.2 Blocking dangerous commands
Below the gateway sits one more, coarser layer.
The built-in shell, mvdan/sh, hard-blocks a small set of commands at policy level.
Not even --yolo unlocks them:
shutdown ยท reboot ยท halt ยท poweroff ยท mkfs ยท initAn attempt returns “command “โฆ” is blocked by shell policy”.
This is insurance against catastrophe, not real isolation.
2.3 Hooks
Pre-hooks add control of your own.
A before hook with a non-zero exit code blocks the tool.
For example, forbid bash when the working directory is your home:
"hooks": {
"bash": { "before": "[ \"$EONYX_CWD\" = \"$HOME\" ] && exit 1 || exit 0" }
}There is a whole article on hooks.
3 ๐ Summary
- Permission gateway
- reading is always allowed (
read,ls,glob,grep, the git status tools,todo_write); everything else goes through the gateway allowed_toolsallows without questions,--yoloremoves the gateway for the session- the TUI asks allow once / always / deny; a denial does not break the flow
- reading is always allowed (
- Plan mode
/planโ read-only until you approve the plan
- Boundaries and guardrails
sandboxlocks the file tools inside the project root- the coarse shell block:
shutdown/reboot/mkfsโฆ not even with--yolo - pre-hooks can block a tool with their exit code