Skip to content

Conversation

@justinxu421
Copy link

@justinxu421 justinxu421 commented Jan 21, 2026

Summary

Add client identification (clientInfo) to the ACP (Agent Communication Protocol) initialize request to enable proper client whitelisting by ACP agents.

Problem

When Avante connects to ACP agents like auggie, the agent needs to identify and whitelist the connecting client. Currently, Avante only sends protocolVersion and clientCapabilities during the ACP initialization handshake, but is missing the clientInfo field that contains the client's name and version.

This causes issues with ACP agents that require client identification for whitelisting purposes. For example, auggie logs show it expects a user-agent string:

'ACPSessionManager': Using session user-agent: augment.cli/0.15.0-prerelease.4 (commit 7a31a643)/acp

Without clientInfo, ACP agents cannot properly identify Avante clients, potentially blocking or limiting functionality.

Solution

This PR adds clientInfo support to the ACP client implementation with sensible defaults.

Changes Made

  1. Added ClientInfo type definition with name and version fields
  2. Updated ACPClient class to include client_info field
  3. Updated ACPClient:new() to initialize client_info with defaults:
    • Default name: "avante.nvim"
    • Default version: "0.0.1"
  4. Modified initialize request to include clientInfo in the parameters sent to ACP agents
  5. Fixed nil-safety for the config parameter in ACPClient:new()

ACP Initialize Request (Before)

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": 1,
    "clientCapabilities": {
      "fs": {
        "readTextFile": true,
        "writeTextFile": true
      }
    }
  }
}

ACP Initialize Request (After)

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": 1,
    "clientInfo": {
      "name": "avante.nvim",
      "version": "0.0.1"
    },
    "clientCapabilities": {
      "fs": {
        "readTextFile": true,
        "writeTextFile": true
      }
    }
  }
}

Testing

Tested with auggie ACP client to verify:

  • clientInfo is properly sent in the initialize request
  • ✅ ACP agents can identify and whitelist Avante clients
  • ✅ Default values work correctly
  • ✅ Nil-safety for config parameter works as expected

Used local config to test this out

  {
    dir = "/Users/justinxu/avante.nvim",
    name = "avante.nvim",
    event = "VeryLazy",
    lazy = false,
    version = false,
    opts = {
      -- add any opts here
    },
    build = "make",
    dependencies = {
      "nvim-treesitter/nvim-treesitter",
      "stevearc/dressing.nvim",
      "nvim-lua/plenary.nvim",
      "MunifTanjim/nui.nvim",
      "nvim-tree/nvim-web-devicons",
    },
  },

Before:
image

After:
image

Impact

This change enables Avante to work properly with ACP agents that require client identification for whitelisting, such as auggie and other ACP-compliant agents. It follows the ACP protocol specification (similar to LSP) which requires clients to identify themselves during initialization.

Related

  • Fixes issues with auggie ACP client whitelisting
  • Aligns with ACP protocol specification for client identification

Remove the ability to override client_info via config as it's not
needed. The client will always identify as 'avante.nvim' v0.0.1.
@justinxu421 justinxu421 marked this pull request as ready for review January 21, 2026 20:03
@justinxu421 justinxu421 changed the title add client info into avante for allow ACP whitelist Add client info into avante for allow ACP whitelist Jan 21, 2026
@justinxu421 justinxu421 changed the title Add client info into avante for allow ACP whitelist Add client info into avante for allow ACP whitelist in auggie Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant