Skip to content

Bug: Gemini CLI requires -p flag for non-interactive mode #71

@Serhan-Asad

Description

@Serhan-Asad

Summary

The Gemini CLI has changed its behavior - positional arguments now default to interactive mode, causing pdd bug and other agentic commands to hang when calling the gemini CLI.

Root Cause

In pdd/agentic_common.py, the _run_with_provider function was passing the prompt as a positional argument:

cmd = [
    cli_path,
    f"Read the file {prompt_path.name} for your full instructions and execute them.",
    "--yolo",
    "--output-format", "json"
]

The Gemini CLI now shows this message:

ℹ Positional arguments now default to interactive mode. To run in non-interactive mode, use the --prompt (-p) flag.

Fix

Add the -p flag to force non-interactive mode:

cmd = [
    cli_path,
    "-p", f"Read the file {prompt_path.name} for your full instructions and execute them.",
    "--yolo",
    "--output-format", "json"
]

Affected Version

  • Gemini CLI version: 0.27.0
  • pdd-cli version: 0.0.138

Impact

All agentic commands (pdd bug, pdd change, pdd fix <url>, etc.) fail to use the Google provider because the gemini CLI hangs waiting for interactive input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions