veil gives AI agents structured shell results to cut token waste

veil is an MCP shell for AI agents that returns organized command effects instead of long raw terminal output. Many agent shell tools send and errors straight back to the model, which can make the agent search messy text, re-check the same state, and spend extra tokens. veil treats command results as data, including changed files, errors, and saved details that can be queried later.

File changes are detected through or a , instead of asking the agent to run another status check. Stored output can be searched with commands such as `sh_detail id=cmd3 match=ERROR`, and it remains available after a server restart, so the agent does not need to rerun the command. `sh_plan` checks a command before it runs and labels its possible impact as read-only, changing files, or destructive.

and restore use APFS CoW, with an optional kernel sandbox for tighter limits. It is released under the , runs over stdio, works with such as Claude Code, Cursor, and Zed, and includes 187 live-server test assertions plus a token-savings backtest.

Key points

  • Returns structured command effects instead of dumping raw terminal text into the model.
  • Lets agents search saved command output later without rerunning the command.
  • Classifies commands before execution by how risky their effects may be.
  • Adds and restore support to help recover from bad file changes.
  • Works with common and includes tests plus a token-savings backtest.
Read original