Tools

Git

Built-in tools for git operations. Agents can commit, checkout, push, stash, and manage branches — all from within a task.

Git tools

ToolParamsDescription
git_commitmessage, files?, all?Stage specified files (or all changes if all: true) and create a commit with the given message
git_checkoutbranch, create?Switch to a branch, optionally creating it if it does not exist
git_pushremote?, branch?, force?Push the current branch to the specified remote (defaults to origin)
git_stashaction, message?, index?Push, pop, or drop a stash entry; action is push, pop, or drop
git_diffref?, staged?, files?Return the diff for staged changes, unstaged changes, or a specific commit ref

Configuration

yaml
tools:
  git:
    enabled: true

Permissions

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:

CapabilityRequired for
git:readgit_diff
git:writegit_commit, git_checkout, git_stash
git:pushgit_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.