Git
Built-in tools for git operations. Agents can commit, checkout, push, stash, and manage branches — all from within a task.
Git tools
| Tool | Params | Description |
|---|---|---|
git_commit | message, files?, all? | Stage specified files (or all changes if all: true) and create a commit with the given message |
git_checkout | branch, create? | Switch to a branch, optionally creating it if it does not exist |
git_push | remote?, branch?, force? | Push the current branch to the specified remote (defaults to origin) |
git_stash | action, message?, index? | Push, pop, or drop a stash entry; action is push, pop, or drop |
git_diff | ref?, staged?, files? | Return the diff for staged changes, unstaged changes, or a specific commit ref |
Configuration
yaml
tools:
git:
enabled: truePermissions
Git tools respect the agent's capability policy. The following capabilities must be granted in the agent config for the corresponding tool group to be available:
| Capability | Required for |
|---|---|
git:read | git_diff |
git:write | git_commit, git_checkout, git_stash |
git:push | git_push |
⚠Destructive git operations — including force push (
git_push with force: true) and hard reset — require explicit human approval before execution. The agent will pause and emit an approval.requested event until the operation is confirmed or rejected.