Skip to content

Allow interactive mode to stay alive even when process.stdin.isTTY is false #13924

@Thumbby

Description

@Thumbby

What would you like to be added?

I would like gemini-cli to provide a new CLI option that allows the CLI to remain active and continue listening to stdin even when stdin.isTTY is false.
Currently, the CLI immediately exits if it detects that stdin is not a TTY (for example, when launched by another program, a script, or a background service). This makes it hard to run the CLI in a programmatically controlled long-running session.

Why is this needed?

As a developer, integrating gemini-cli into other applications can be very useful.
However, when the CLI is launched programmatically (e.g., from Java, Node.js, or a backend service), stdin is usually not a TTY, which prevents the interactive mode from working.
Supporting interactive mode without a TTY would enable many valuable integration scenarios, including:

  • server-side agents
  • IDE or editor extensions
  • browser-based or embedded terminals
  • automated development tools and workflows

Additional context

Thanks for providing this great CLI tool! This feature would make it much easier to embed the CLI into other applications while still using the interactive experience.

Metadata

Metadata

Assignees

Labels

area/non-interactiveIssues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automationhelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!priority/p2Important but can be addressed in a future release.type/feature
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions