Skip to content

[Android/Termux] Fix duplicate UI and repeated auth prompts caused by relauncher loop and resize remounting #18914

Description

@heihuo000

This issue report describes two major UX problems on Android/Termux.

  1. Relauncher Loop (Duplicate Logos and Auth prompts):
    When Termux is moved to the background, Android often kills the high-resource child process. The parent monitoring process then restarts a new child, leading to duplicate ASCII logos and repeated OAuth login prompts.

  2. UI Remounting on Resize:
    Virtual keyboard toggles trigger terminal resizes. The current React key mapping forces a full remount, which clutters terminal history with new Headers.

Proposed Fixes (Tested):

  • In packages/cli/src/utils/relaunch.ts: Disable relauncher if os.platform() is 'android'.
  • In packages/cli/src/gemini.tsx: Use a stable key for AppContainer on 'android' to prevent full remounts.

Full technical details and patch were verified in a local Termux environment. Improving stability for mobile CLI users would be a great addition to Gemini CLI.

Metadata

Metadata

Assignees

Labels

area/coreIssues related to User Interface, OS Support, Core Functionalityeffort/medium2-3 days: UI state, async flow, cross-component refactorshelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!kind/bugpriority/p2Important but can be addressed in a future release.status/bot-triagedtype/bug

Type

Projects

Status
Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions