Skip to content

Comments

fix(acp): Initialize config (#18897)#18898

Merged
jackwotherspoon merged 2 commits intogoogle-gemini:mainfrom
Mervap:acp/config_initialization
Feb 19, 2026
Merged

fix(acp): Initialize config (#18897)#18898
jackwotherspoon merged 2 commits intogoogle-gemini:mainfrom
Mervap:acp/config_initialization

Conversation

@Mervap
Copy link
Contributor

@Mervap Mervap commented Feb 12, 2026

Summary

Fix non-initialized Config in ACP integration

Details

There is a GeminiAgent.config instance that is used across different ACP integration methods. However, this config is never initialized, which leads to inconsistent behavior

Related Issues

Fixes #18897

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

@Mervap Mervap requested a review from a team as a code owner February 12, 2026 10:56
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Mervap, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical bug within the ACP integration where the GeminiAgent.config instance was not being initialized. By adding an explicit initialization call, the change prevents inconsistent behavior and ensures the configuration is always in a valid state when accessed by various integration methods.

Highlights

  • Configuration Initialization: Ensured the GeminiAgent.config instance is properly initialized before use within ACP integration methods, resolving inconsistent behavior caused by uninitialized configuration.
Changelog
  • packages/cli/src/zed-integration/zedIntegration.ts
    • Added an explicit call to initialize the GeminiAgent.config instance.
Activity
  • No human activity (comments, reviews) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly identifies and fixes an issue where the GeminiAgent's configuration was not being initialized. By adding await this.config.initialize() in the initialize method, you ensure that the agent's configuration is properly set up before it's used. However, this change reveals a potential race condition in Config.initialize() related to how it handles interactive mode, which could lead to the agent operating with an incomplete set of tools. This race condition aligns with the principles discussed in our rules regarding robust tool synchronization. I've added a comment with a more detailed explanation.

@gemini-cli gemini-cli bot added the area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality label Feb 12, 2026
@skeshive
Copy link
Contributor

@Mervap
Copy link
Contributor Author

Mervap commented Feb 16, 2026

This is a different config, the session config
The GeminiAgent.config not initialized (basic one)

@Mervap
Copy link
Contributor Author

Mervap commented Feb 16, 2026

@skeshive

The config is usually initialized here –

await config.initialize();

But for ACP the early return happens here

return runZedIntegration(config, settings, argv);

@gemini-cli gemini-cli bot added priority/p2 Important but can be addressed in a future release. area/core Issues related to User Interface, OS Support, Core Functionality help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! labels Feb 16, 2026
@Mervap
Copy link
Contributor Author

Mervap commented Feb 19, 2026

Seems I have no permissions to merge, even when everything is approved. @sripasg, could you please merge this

@jackwotherspoon jackwotherspoon added this pull request to the merge queue Feb 19, 2026
@jackwotherspoon
Copy link
Contributor

I got you covered @Mervap , in the queue now 👍

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 19, 2026
@jackwotherspoon jackwotherspoon added this pull request to the merge queue Feb 19, 2026
Merged via the queue into google-gemini:main with commit 1a8d773 Feb 19, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality area/core Issues related to User Interface, OS Support, Core Functionality help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! priority/p2 Important but can be addressed in a future release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Acp/ZedIntegration Inconsistent config state after GeminiAgent.initialize

5 participants