Agent tools
How the agent selects and runs tools against the workspace.
Overview
The agent loop lives in Rust under src-tauri/src/agent/. Tools (read file, edit, grep, terminal, plans, and others) are dispatched from a central registry. The frontend renders tool progress and results from streamed events; chat collapses those steps into a per-turn summary you can expand.
Modes such as Ask and Plan restrict which tools are available. Those restrictions are agent-policy concerns, not billing entitlements. Visual mode (legacy design) attaches DESIGN.md and allows an in-chat component preview tool.
Plans
Saved plans are written under .shape/plans/ in the project. The editor can open them with a plan-specific header; building a plan dispatches a chat turn via a window event that the chat session handles.