-
Notifications
You must be signed in to change notification settings - Fork 123
Open
Labels
Description
Problem
Gemini CLI supports gemini --resume "latest" for resuming the most recent session, and stores session JSON files under ~/.gemini/tmp/<project_hash>/chats/. The module's start.sh always starts a fresh session with no resume logic. It also doesn't pass --type gemini to agentapi.
The module currently passes the task prompt via --prompt-interactive "$PROMPT". On resume, this must be skipped.
Desired outcome
- On cold start: Gemini starts normally with the task prompt.
- On warm start (prior sessions exist): Gemini resumes the latest session. The task prompt is not re-sent.
--type geminiis passed toagentapi server.- After feat(coder/modules/agentapi): add state persistence #736 lands:
enable_state_persistence = true.
Key upstream behaviors
- Critical:
--resume "latest"causes a dead loop when no sessions exist (google-gemini/gemini-cli#15892). The module MUST check for existing sessions before passing--resume. Session files live under~/.gemini/tmp/*/chats/*.json. - Session files can grow very large (400MB+ reported in google-gemini/gemini-cli#15292) for long-running tasks.
Version bump
minor
Refs #696
Reactions are currently unavailable