Skip to content

[Bug] v2.75.0: "agent server address is not set" — a2a-server.mjs crashes due to missing USE_CCPA environment variable injection #1222

@quantifex

Description

@quantifex

Environment:

  • VS Code 1.113.0
  • Gemini Code Assist / Cloud Code v2.75.0
  • OS: MacOS (Local) OR Ubuntu 24.04 (Remote-SSH)

Symptom:
Attempting to use Agent Chat results in the Go Language Server throwing the error:

getting conversation response: agent server address is not set; the agent may still be starting or failed to initialize.

The chat completely fails to respond.

Root Cause Analysis:
The Go Language Server is throwing this error because the TypeScript Extension Host is failing to populate the a2aAddr configuration field during the LSP workspace/configuration handshake.
The a2aAddr is left blank because the newly decoupled Node.js microservice (agent/a2a-server.mjs) crashes upon execution.
Running the script manually reveals the issue:

$ node ~/.vscode/extensions/google.geminicodeassist-2.75.0/agent/a2a-server.mjs
[ERROR] 2026-04-01 -- [Config] Unable to set GeneratorConfig. Please provide a GEMINI_API_KEY or set USE_CCPA.
[ERROR] 2026-04-01 -- [CoreAgent] Error during startup: [Config] Unable to set GeneratorConfig. Please provide a GEMINI_API_KEY or set USE_CCPA.

The Bug:
The parent VS Code TypeScript Extension Host is failing to pass the USE_CCPA=true (or GEMINI_API_KEY) environment variable down to the a2a-server.mjs child process when it spawns it.
Because the child process doesn't inherit the authentication context flag, it panics on startup. The parent TS extension swallows the child's crash, leaves a2aAddr blank, and the Go LS is left waiting for an RPC bridge that doesn't exist.

Confirmed Workaround:
Manually forcing the environment variable into the OS GUI context (e.g., running launchctl setenv USE_CCPA true on MacOS, or injecting it into /etc/environment for Remote-SSH Linux) resolves the issue, allowing a2a-server.mjs to boot successfully and populate a2aAddr.

Suggested Fix:
Update the spawn or fork execution wrapper in the main Extension Host that calls a2a-server.mjs to ensure process.env.USE_CCPA (or the equivalent auth state flag) is explicitly injected into the env object of the child process options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions