Create and Wait for Jules Session
jules_execute_and_waitRun a coding task in a new Jules session and wait for completion. Returns the final state, summary, and pull request details, with progress tracking and timeout protection.
Instructions
Create a new Jules session and immediately wait/poll for its completion. Automatically tracks progress, emits progress notifications, and returns a unified payload with final state, summary, and PR details upon resolution. Bounded by a wait limit to prevent timeouts.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"repoOwner": "<repoOwner>",
"repoName": "<repoName>",
"prompt": "<prompt>"
},
"name": "jules_execute_and_wait"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Optional custom title for the session | |
| branch | No | Starting branch name (default: main) | main |
| prompt | Yes | Detailed task description - be specific about what needs to be done | |
| repoName | Yes | GitHub repository name | |
| repoOwner | Yes | GitHub repository owner (username or organization) | |
| autoApprove | No | Automatically approve the execution plan (default: true). Set false to manually approve with jules_approve_plan | |
| autoCreatePR | No | Automatically create pull request when task completes (default: false) | |
| maxWaitSeconds | No | Maximum time to wait/poll in seconds (default: 60, max: 300) | |
| includeActivities | No | Number of recent activities to include in the output (default: 5) |