Skip to content

requireApproval: false returns FAILED_PRECONDITION - blocks automated workflows #18

@sanjay3290

Description

@sanjay3290

Description

The SDK source code shows a requireApproval option for session creation, but when used, the API rejects it with FAILED_PRECONDITION.

This blocks all automated/CI use cases.

Steps to Reproduce

import { jules } from '@google/jules-sdk';

const session = await jules.session({
  prompt: 'Test task',
  source: { github: 'owner/repo', baseBranch: 'main' },
  requireApproval: false,  // Attempt to skip manual plan approval
  autoPr: false
});

Expected Behavior

Session executes without waiting for manual plan approval in web UI.

Actual Behavior

[400 Bad Request] POST https://jules.googleapis.com/v1alpha/sessions
{
  "error": {
    "code": 400,
    "message": "Precondition check failed.",
    "status": "FAILED_PRECONDITION"
  }
}

Impact

  • Blocks CI/CD integration
  • Blocks automated testing
  • Blocks batch processing
  • Every session requires manual visit to web UI to approve

Environment

  • SDK: @google/jules-sdk (latest)
  • Node.js: v22.14.0
  • Platform: macOS

Suggested Solutions

  1. Enable requireApproval: false for all users
  2. Document this as a feature flag requiring enablement
  3. Provide alternative endpoint for automated workflows

Happy to provide more details or test fixes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions