You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gemini: wire session resume on workspace restart #745
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 gemini is passed to agentapi server.
Expose enable_state_persistence in main.tf (default true) and pass it through to the module "agentapi" block so the Coder UI preserves chat history across restarts, matching the agent's resumed session.
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.
Activity
Harsh9485 commentedon Mar 18, 2026
I'm working on this issue.