Overview
Use Gemini CLI inside a service's repository to read exported incident logs, line them up with recent configuration and deploy commits, and draft a revert for the on-call engineer to approve.
Problem or Objective
- Which agents help find the cause of a production bug?
- Which agents investigate monitoring alerts for on-call staff?
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- Gemini CLI · Git
- Prerequisites
- Gemini CLI is designed for organisations with a Gemini Code Assist Standard or Enterprise licence or Code Assist for GitHub on Google Cloud (plus legacy paid API or Vertex keys); free and Google AI Pro or Ultra users moved to Antigravity CLI on June 18, 2026. A local clone of the service repository and exported incident logs.
How It Works
Export the log lines and error messages around the incident window to a local file, and note when the problem started. Open Gemini CLI in a clone of the service's repository. Ask it to read the log file, list the commits that touched configuration, infrastructure or deploy files in the hours before the start time, and explain which change best matches the errors, with the evidence for and against each candidate. Ask for a proposed revert as a diff or a revert commit on a new local branch, plus a short rollback note. Do not let it push, merge or deploy. The on-call engineer reviews the diff and the note, decides whether to roll back, and ships the revert through the team's normal review and deploy process. If you want Gemini CLI to query a log or monitoring system directly, connect it as an MCP server, but check first that your provider offers one.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Gemini CLI.
- Connect the toolsConnect the tools this workflow relies on: Gemini CLI, Git.
- Check the prerequisitesGemini CLI is designed for organisations with a Gemini Code Assist Standard or Enterprise licence or Code Assist for GitHub on Google Cloud (plus legacy paid API or Vertex keys); free and Google AI Pro or Ultra users moved to Antigravity CLI on June 18, 2026. A local clone of the service repository and exported incident logs.
- Gather your detailsCollect what the prompt asks for: Path to the exported log file, When the problem started (UTC), What users or alerts saw, Hours of history to check.
- Run the starter promptPaste the starter prompt below into Gemini CLI and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at github.com before you rely on it.
Practical Starter Prompt: Find the change behind an incident
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Read the incident logs in [Path to the exported log file]. The problem started around [When the problem started (UTC)] with this symptom: [What users or alerts saw]. List the commits in this repository that changed configuration, infrastructure or deploy files in the [Hours of history to check] hours before that time. For each one, explain how well it matches the errors, with evidence for and against. Then propose a revert of the most likely change as a diff on a new local branch, with a short rollback note. Do not push, merge or deploy anything; stop and wait for my review.Run this in an interactive Gemini CLI session in a local clone. Redact secrets and customer data from the log file first. The on-call engineer reviews the proposed diff and note and decides whether to roll back; the revert then goes through normal review and deploy, never straight from the CLI.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. The Gemini CLI README lists debugging and troubleshooting in natural language and extending the CLI with MCP servers. No cited page shows an incident traced to a configuration change or a revert proposed this way, so how often the suggested culprit is the right one is untested here.
Limitations and Considerations
Gemini CLI is now maintained for organisations with a Gemini Code Assist Standard or Enterprise licence or Code Assist for GitHub on Google Cloud; free individual use and Google AI Pro or Ultra accounts moved to Antigravity CLI on June 18, 2026. Logs can hold secrets and customer data, so redact them before sharing and follow your company's data rules. Whether your logging or monitoring system has an MCP server was not verified. Treat the proposed cause as a lead, not a finding: a person checks it and decides on any rollback, and the revert goes through normal review. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Related Videos
About google-gemini/gemini-cli
Google Gemini CLI Is FREE & Crazy Powerful: Real World Coding Test & First Impressions (opens in a new tab)
The description links the GitHub repository.
Watch on YouTube (opens in a new tab)About google-gemini/gemini-cli
Gemini CLI – the real Claude Code killer? (opens in a new tab)
The description links the GitHub repository.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- google-gemini/gemini-cli README (opens in a new tab)
Project documentation · github.com · Undated · Source checked 27 Nov 2026, 04:38 UTC
What this source supports
- Debug issues and troubleshoot with natural language
- Configure MCP servers in `~/.gemini/settings.json` to extend Gemini CLI with custom tools:
- An important update: Transitioning Gemini CLI to Antigravity CLI - Google Developers Blog (opens in a new tab)
Vendor post · developers.googleblog.com · Undated · Source checked 27 Nov 2026, 04:38 UTC
What this source supports
- If your organization uses Gemini CLI or our IDE extensions via a Gemini Code Assist Standard or Enterprise license, or if your organization uses Gemini Code Assist for GitHub through Google Cloud, your access remains unchanged.

