Files
local-mcp/AGENTS.md
Brandon Zhang 204f7c4ff6 docs(agents): add warning about committing compiled binaries
Binary executables bloat .git history and cause storage issues on
constrained upstream repos. Added recovery procedure:
git reset --soft HEAD~N, git reset HEAD <file>, delete, recommit.
2026-03-27 14:49:17 +08:00

1.9 KiB

Notes on calling tools

  • About run_in_terminal or some other similar tools that can make calls to external programs, be very careful about what programs/commands you call - some are blocking indefinitely by nature, like running servers, long-running monitors, etc. If you would like to execute such commands, make sure to run them in a non-blocking way, for example run/spawn them in another temp terminal session. Otherwise, your agent will be hung on the waiting indefinitely.
  • About AskUser, get_user_request or other similar tools that can retrieve latest user input, if available, make sure to call them AGGRESSIVELY once you finished all tasks at hand, so as to AVOID ending the current task/work/session prematurely. NEVER end the current task/work/session on your own, the user will keep adding new instructions into this kind of tools in the background. You can be missing out CRITICAL instructions from user when you failed to call them aggressively. Also, sometimes these tools can fail to return any results due to technical issues. Just try to call again when that happens.
  • About git commands: always use git --no-pager (or pipe output through | Out-String) when running git commands in the terminal. Without this, git may invoke less as a pager, causing the terminal to hang waiting for user interaction. Example: git --no-pager log --oneline -10, git --no-pager diff, git --no-pager status. Similarly for any other command that may invoke a pager (e.g. man, less).
  • About git commits: NEVER commit compiled binaries (executables, .exe, .dll, .so, .dylib, etc.) to the repository. Always ensure .gitignore excludes them before committing. If a binary is accidentally committed, use git reset --soft HEAD~N to undo commits, git reset HEAD <file> to unstage, then delete the file and recommit. Large binaries bloat the .git history and cause storage issues on constrained upstream repos.