google-gemini/gemini-cli

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

已关闭

#18,914 创建于 2026年2月12日

 (6 条评论) (1 个反应) (1 位负责人)TypeScript (13,657 个派生)batch import
area/coreeffort/mediumhelp wantedkind/bugpriority/p2status/bot-triagedtype/bug

仓库指标

星标
 (103,992 个星标)
PR 合并指标
 (平均合并 4天 2小时) (30 天内合并 55 个 PR)

描述

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.

贡献者指南