jules_apply_patch
Fetch a completed Jules session's git patch and apply it to a local repo with 3-way merge, optionally creating a branch, running tests, and auto-committing.
Instructions
Fetch the clean git unidiff patch from a completed Jules session and apply it directly to a local repository workspace, with optional branch creation, test execution, and auto-commit using 3-way merge.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | Yes | Absolute local repository path on this machine (e.g. '/root/projects/agent-brain'). | |
| session_id | Yes | The Jules session ID containing the git patch output. | |
| auto_commit | No | If true and tests pass (or no test command given), automatically commits the changes using Jules's suggested commit message (defaults to false). | |
| branch_name | No | Optional branch name to create and switch to before applying (e.g. 'jules/fix-health-check'). | |
| test_command | No | Optional verification command to execute after applying patch (e.g. 'npm test' or 'pytest'). |