jules_consolidate_sessions
Merge multiple Jules sessions on the same repo into one clean branch or unified PR. Resolves cloud branch drift via 3-way unidiff, runs tests, and creates a single PR without conflicts.
Instructions
Reconcile and merge multiple concurrent Jules sessions on the SAME repository into a single clean local branch or unified PR. Uses 3-way unidiff application to resolve cloud branch drift automatically, runs tests, and creates 1 clean PR without merge conflicts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pr_title | No | Custom PR title for the consolidated Pull Request. | |
| repo_path | Yes | Absolute local repository path (e.g. '/root/projects/agent-brain'). | |
| base_branch | No | Base branch to branch off of (defaults to 'main'). | |
| session_ids | No | List of completed session IDs to consolidate. If omitted, automatically discovers all completed sessions for this repo. | |
| test_command | No | Verification command to run (e.g. 'npm test' or 'pytest'). | |
| target_branch | No | Branch name to create and commit to (defaults to 'jules/consolidated-<timestamp>'). | |
| auto_create_pr | No | If true and tests pass, automatically pushes the branch and creates a unified GitHub PR via 'gh' (defaults to true). |