mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-30 16:00:41 -07:00
Add --forever CLI flag that enables autonomous agent operation with scheduled work, context management, A2A protocol support, and session optimization. Core features: - Time-based WorkScheduler: manages a sorted list of scheduled prompts that fire at absolute or relative times, persisted across sessions - schedule_work tool: add/cancel scheduled prompts with 'at' (local time) or 'inMinutes' (relative) params; current time and schedule prepended to every model turn - A2A HTTP listener: JSON-RPC 2.0 server bridges external messages into the session (message/send, tasks/get, responses/poll) - PreCompress hook: hooks can return newHistory to replace built-in LLM compression - Idle hook: fires after configurable inactivity, can auto-submit prompts - Forever mode disables MemoryTool, EnterPlanModeTool, interactive shell UI: - ScheduledWorkDisplay component shows all pending items above the context summary bar - A2A port shown in StatusDisplay when active Session optimization for long-running sessions: - Record lastCompressionIndex on ConversationRecord; on resume, only load post-compression messages - Restore scheduled work items on session resume (past-due fire immediately) - Skip file I/O in updateMessagesFromHistory when no tool results to sync - Prune UI history to last 50 items after each context compression