Pick the right tool first. Reliability beats cleverness.
Use web_fetch when: - You only need the text of a page - You don’t need login/session state - You don’t need to click UI elements Use browser when: - You must interact with UI (forms, buttons) - The content is behind scripts/login - You need screenshots or to confirm visual layout
Use exec when: - Running tests/builds locally - Editing files via scripts - Inspecting logs, git status, etc. Use browser automation when: - The action exists only in a web UI - You need to submit forms or click flows Rule: don’t automate a web UI if a CLI/API exists.
Spawn a sub-agent when: - Research or refactors will take more than a couple minutes - You want parallel investigation (logs + docs + code) - You need a clean context without polluting the main thread Otherwise: keep it in one thread and finish the loop.
Before using tools: - Identify the minimum tool that can succeed (web_fetch < browser < exec). - Pin the working directory and file paths. - If the action is destructive, ask for confirmation. - Prefer deterministic outputs (JSON, diffs, exact commands). - After changes: run a verification command.
Use cron when:
- Exact timing matters ("9:00 AM sharp")
- It’s a one-shot reminder ("in 20 minutes")
- The task should run without main-session context
Use heartbeat when:
- You want to batch checks (inbox + calendar + notifications)
- Timing can drift (every ~30 min)
- You want to reduce API calls
Before sending a message (message tool): - Show the exact message text. - Confirm the destination (channel/user). - After sending, return NO_REPLY to avoid duplicate replies.