Conversation
Add support for Auggie (Augment Code's AI agent) as an ACP agent in AutoDev. Changes: - Updated ConfigFile.kt with Auggie configuration example and documentation - Updated AcpConnectionProvider.jvm.kt with Auggie support documentation - Added auggie-acp-setup.md: Complete setup guide for Auggie integration - Added acp-agents-overview.md: Overview of all supported ACP agents Auggie uses standard ACP JSON-RPC protocol and works with existing JvmAcpConnection implementation. No special handling required. Configuration example: Related: #536 Agent-Id: agent-4cf3ddd1-b330-47f4-986d-094547c663c0
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughAdds ACP documentation and Auggie agent configuration, updates ACP agent support notes in JVM code, introduces platform APIs for ACP logs directory, inserts non-functional logging in the IDEA toolwindow, and converts MCP preloading from a suspending function to a non-suspending function that launches its own background coroutine. Changes
Sequence Diagram(s)sequenceDiagram
participant VM as IdeaAgentViewModel
participant Preloader as Preload Coroutine
participant MCP as MCP Servers
participant UI as UI State
VM->>Preloader: startMcpPreloading() (launch coroutine)
Preloader->>MCP: initialize MCP servers
MCP-->>Preloader: emit init progress / events
Preloader->>Preloader: optional monitor coroutine (poll/status)
Preloader->>UI: update preload status / set ready
Preloader-->>VM: completion or error (logged)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 Augment PR SummarySummary: This PR documents using Auggie (Augment Code) as an ACP agent in AutoDev and updates the in-code configuration examples accordingly. Changes:
Technical Notes: Auggie is treated as a standard ACP JSON-RPC agent and uses the existing 🤖 Was this summary useful? React with 👍 or 👎 |
mpp-ui/docs/acp-agents-overview.md
Outdated
| ### In CLI | ||
|
|
||
| ```bash | ||
| autodev code -p /path/to/project -t "Your task" --engine auggie |
There was a problem hiding this comment.
The CLI example uses --engine auggie, but the JS/Node autodev code path only supports claude/codex and unknown engine ids fall back to Claude, so this command likely won’t run Auggie via ACP as written.
Severity: medium
Other Locations
mpp-ui/docs/auggie-acp-setup.md:80
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| @@ -15,14 +15,21 @@ import java.io.File | |||
| /** | |||
| * Create the appropriate connection based on agent configuration. | |||
There was a problem hiding this comment.
The KDoc for createAcpConnection() says it selects Claude vs other agents based on configuration, but the implementation always returns JvmAcpConnection(); the config-based selection is in createConnectionForAgent().
Severity: low
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
There was a problem hiding this comment.
Pull request overview
Adds documentation and configuration examples to support using Auggie (Augment Code) as an ACP agent within AutoDev’s existing ACP/JSON-RPC integration (no special runtime handling introduced).
Changes:
- Extend Kotlin KDoc/comments to include Auggie among supported ACP agents.
- Add a dedicated Auggie ACP setup guide.
- Add an overview document describing supported ACP agents and configuration.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| mpp-ui/src/jvmMain/kotlin/cc/unitmesh/devins/ui/compose/agent/acp/AcpConnectionProvider.jvm.kt | Updates ACP connection provider documentation to mention Auggie and supported agents. |
| mpp-ui/docs/auggie-acp-setup.md | New setup guide for configuring and using Auggie via ACP. |
| mpp-ui/docs/acp-agents-overview.md | New overview doc for ACP agents, configuration, and troubleshooting. |
| mpp-core/src/commonMain/kotlin/cc/unitmesh/config/ConfigFile.kt | Updates config documentation/examples to include an Auggie ACP agent entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mpp-ui/docs/acp-agents-overview.md
Outdated
| ### Claude Code | ||
| - **Provider**: Anthropic | ||
| - **Features**: Code generation, analysis, testing | ||
| - **Installation**: Follow [Claude Code documentation](https://docs.anthropic.com/claude/docs/claude-code) | ||
|
|
||
| ### Gemini CLI | ||
| - **Provider**: Google | ||
| - **Features**: Code generation, analysis | ||
| - **Installation**: Follow [Gemini documentation](https://ai.google.dev) | ||
|
|
There was a problem hiding this comment.
This overview states all listed agents are "ACP-compliant", but Claude Code is implemented via its own stream-json protocol (not standard ACP JSON-RPC) in the JVM connection layer. Please clarify this in the overview (e.g., separate "ACP agents" from "special-cased agents"), so users don't assume Claude can be configured/used the same way as true ACP agents.
| ### Claude Code | |
| - **Provider**: Anthropic | |
| - **Features**: Code generation, analysis, testing | |
| - **Installation**: Follow [Claude Code documentation](https://docs.anthropic.com/claude/docs/claude-code) | |
| ### Gemini CLI | |
| - **Provider**: Google | |
| - **Features**: Code generation, analysis | |
| - **Installation**: Follow [Gemini documentation](https://ai.google.dev) | |
| ### Gemini CLI | |
| - **Provider**: Google | |
| - **Features**: Code generation, analysis | |
| - **Installation**: Follow [Gemini documentation](https://ai.google.dev) | |
| ## Special-cased Integrations | |
| In addition to ACP-compliant agents, AutoDev includes built-in support for certain agents that do **not** use the ACP JSON-RPC protocol directly and therefore are not configured via `acpAgents` like standard ACP agents. | |
| ### Claude Code | |
| - **Provider**: Anthropic | |
| - **Protocol**: Uses a custom streaming JSON protocol via the JVM connection layer, not standard ACP JSON-RPC over stdio | |
| - **Features**: Code generation, analysis, testing | |
| - **Installation**: Follow [Claude Code documentation](https://docs.anthropic.com/claude/docs/claude-code) | |
| - **Configuration**: Managed by AutoDev as a special integration; it cannot currently be configured via `acpAgents` / `--acp` like ACP-compliant agents |
mpp-ui/docs/acp-agents-overview.md
Outdated
| ### In CLI | ||
|
|
||
| ```bash | ||
| autodev code -p /path/to/project -t "Your task" --engine auggie |
There was a problem hiding this comment.
The CLI example uses autodev code ... --engine auggie, but the shipped Node CLI currently only supports autodev | claude | codex for --engine and will not route to an ACP agent named auggie. Please update/remove this example or document the correct entrypoint for ACP agents.
| autodev code -p /path/to/project -t "Your task" --engine auggie | |
| autodev code -p /path/to/project -t "Your task" --engine autodev |
| * Create the appropriate connection based on agent configuration. | ||
| * For Claude Code agents, uses [JvmClaudeCodeConnection] with direct stream-json protocol. | ||
| * For all other ACP agents (Gemini, Kimi, Copilot, etc.), uses [JvmAcpConnection]. | ||
| * For all other ACP agents (Auggie, Gemini, Kimi, Copilot, etc.), uses [JvmAcpConnection]. | ||
| */ | ||
| actual fun createAcpConnection(): AcpConnection? = JvmAcpConnection() |
There was a problem hiding this comment.
The KDoc says this function creates the appropriate connection based on agent configuration, but the implementation always returns JvmAcpConnection() and cannot select the Claude stream-json connection. Either update the KDoc to match the behavior, or change the API/implementation to select based on the active agent config (e.g., by removing createAcpConnection() usages in favor of createConnectionForAgent(config)).
| * @see <a href="https://github.com/phodal/auto-dev/issues/538">Issue #538</a> | ||
| */ |
There was a problem hiding this comment.
| * claude: | ||
| * name: "Claude CLI" | ||
| * command: "claude" | ||
| * args: "--acp" | ||
| * env: "" |
There was a problem hiding this comment.
The config example sets Claude's args to "--acp", but the JVM implementation treats Claude as a special case using the stream-json protocol (not standard ACP JSON-RPC) and will forward unknown flags like "--acp" to the claude binary. This is likely to break Claude launches; update the example to omit "--acp" for Claude and document the supported Claude-specific args (e.g., --model, --permission-mode).
mpp-ui/docs/auggie-acp-setup.md
Outdated
| ### In AutoDev CLI | ||
|
|
||
| ```bash | ||
| autodev code -p /path/to/project -t "Your task here" --engine auggie | ||
| ``` |
There was a problem hiding this comment.
The CLI example uses autodev code ... --engine auggie, but the current Node CLI only documents/supports autodev | claude | codex engines and the Kotlin/JS external engine mapping falls back to Claude for unknown ids. Please update the docs to either remove the --engine auggie example or explain the correct way to use ACP agents (e.g., via Compose/desktop with activeAcpAgent, or a dedicated ACP CLI if one exists).
| ### In AutoDev CLI | |
| ```bash | |
| autodev code -p /path/to/project -t "Your task here" --engine auggie | |
| ``` | |
| ### Notes about AutoDev CLI | |
| At the time of writing, the Node-based `autodev` CLI only supports the engines `autodev`, `claude`, and `codex` via the `--engine` flag. | |
| It does **not** support selecting ACP agents like Auggie using `--engine auggie`; unknown `--engine` values will fall back to Claude rather than using Auggie. | |
| To use Auggie as an ACP agent, configure `activeAcpAgent: auggie` in your `~/.autodev/config.yaml` as shown above and interact with it via AutoDev Compose GUI. |
| claude: | ||
| name: "Claude Code" | ||
| command: "claude" | ||
| args: "--acp" | ||
| env: "" |
There was a problem hiding this comment.
This multi-agent example configures Claude Code with args: "--acp", but Claude is handled via the stream-json protocol (not ACP) and unknown flags like --acp will be forwarded to the claude binary. Please remove --acp for Claude and document which Claude flags are supported by AutoDev's wrapper (e.g., --model, --permission-mode).
…ing to fix UI freeze - Add comprehensive diagnostic logging to IdeaAgentViewModel initialization - Add logging to IdeaAgentToolWindowFactory to track tool window creation - Temporarily disable MCP preloading (startMcpPreloading) to prevent EDT blocking - Add warning comments explaining the freeze issue - Change some log levels from info to warn for better visibility This fixes the issue where the IDEA plugin would freeze when opening the tool window in the new Compose-based UI. The root cause was MCP server preloading blocking the EDT thread with a 60-second timeout loop. Testing shows the plugin now starts successfully without freezing.
- Refactor startMcpPreloading() from suspend fun to regular fun - Launch preloading coroutine on Dispatchers.IO immediately (no EDT blocking) - Replace blocking while loop with McpToolConfigManager.waitForPreloading() - Add separate monitor coroutine for real-time status updates - Use proper Job.join() instead of polling with delay() - Cancel monitor job when preloading completes This is the long-term fix for the plugin freeze issue. The previous fix temporarily disabled MCP preloading, which worked but removed functionality. The new implementation: - Never blocks EDT (launches coroutine immediately and returns) - Uses proper suspend functions (waitForPreloading uses Job.join internally) - Monitors status in parallel without interfering with preloading - Provides real-time UI updates via StateFlow - Handles cancellation and errors properly Testing shows the plugin starts successfully with MCP preloading enabled, and the UI remains responsive during the entire preloading process.
- Remove flag from Claude examples in ConfigFile.kt (2 occurrences) - Remove flag from Claude example in auggie-acp-setup.md - Replace with correct stream-json protocol flags: - Update Claude name from "Claude CLI" to "Claude Code" for consistency Claude uses the stream-json protocol, not the ACP protocol. The correct flags are documented in ClaudeCodeClient.kt and AcpAgentPresets.kt. Agent-Id: agent-c66b054e-13db-406a-8052-4537a0eeb5ee
…ose GUI - Remove incorrect CLI examples from acp-agents-overview.md - Remove incorrect CLI examples from auggie-acp-setup.md - Add notes clarifying that ACP agents are only available in Compose GUI - Document that Node CLI only supports autodev, claude, and codex engines Agent-Id: agent-085425e4-2dcc-4e63-a7cc-a44c0b8d013a
…ion KDoc Agent-Id: agent-eab6182a-99aa-4545-b836-5cec30b9be3d
Agent-Id: agent-87523f8c-f2f4-4ded-a972-8c4065e7546b Linked-Note-Id: abbf7eee-2b94-40a6-89f8-f7200b11c7a5
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/toolwindow/IdeaAgentViewModel.kt (1)
415-415:⚠️ Potential issue | 🟡 MinorEmoji character in source code violates coding guidelines.
Line 415 contains
"⚠️ Failed to save agent type preference: ${e.message}". The coding guidelines state: Avoid emoji and UTF-8 characters in source code because WASM does not support them. Replace the emoji with a plain-text prefix.Proposed fix
- println("⚠️ Failed to save agent type preference: ${e.message}") + println("Warning: Failed to save agent type preference: ${e.message}")As per coding guidelines:
**/*.{kt,ts,tsx,js,jsx}: Avoid emoji and UTF-8 characters in source code because WASM does not support them.
🤖 Fix all issues with AI agents
In
`@mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/toolwindow/IdeaAgentToolWindowFactory.kt`:
- Around line 78-81: The warning log thisLogger().warn(...) is inside the
`@Composable` lambda passed to addComposeTab and will run on every recomposition;
remove that log from inside the lambda and either move the logging statement
before the addComposeTab call (where the surrounding non‑composable scope
exists) or, if you must log from within the composable scope, wrap the log in a
LaunchedEffect(Unit) so it only runs once; update references to IdeaAgentApp and
the lambda accordingly.
🧹 Nitpick comments (3)
mpp-ui/docs/acp-agents-overview.md (1)
80-90: Fix duplicated section heading for Compose GUI.There are two “### In Compose GUI” sections back-to-back; the second reads like a Compose-only note + Auggie steps. Consider merging or renaming the second heading (e.g., “Compose GUI (Auggie)” or “Compose GUI notes”) to avoid confusion.
✂️ Suggested doc tweak
-### In Compose GUI +### Compose GUI Notesmpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/toolwindow/IdeaAgentViewModel.kt (2)
160-165: Excessive use ofwarnlevel for routine diagnostic logging.All the
vmLogger.warn(...)calls added throughout this file (init,loadConfiguration,startMcpPreloading,loadAcpAgents) are informational/trace-level messages — not actionable warnings. Usingwarnwill pollute IDEA's log with noise at a level that users and support teams typically filter on for real problems. Consider usinginfofor lifecycle milestones anddebugfor the verbose tracing (thread names, coroutine starts, config values).Example adjustment for the init block
- vmLogger.warn("=== IdeaAgentViewModel init START === Project: ${project.name}") + vmLogger.info("IdeaAgentViewModel init for project: ${project.name}") // Load configuration on initialization loadConfiguration() // Load ACP agents loadAcpAgents() - vmLogger.warn("=== IdeaAgentViewModel init END === (async operations launched)") + vmLogger.debug("IdeaAgentViewModel init complete (async operations launched)")This applies to all
vmLogger.warn(...)calls in lines 173, 175, 177, 179, 182, 187, 193, 198, 228, 233, 241, 244, 250, 255, 270, 272, 281, 288, 302, 304, 306, 308, 310, 312, 317, 318. Replace withinfo/debugas appropriate, reservingwarnfor conditions that deserve operator attention.
301-325: DoubleConfigManager.load()on init — bothloadConfiguration()andloadAcpAgents()read config independently.Both functions are launched concurrently from
init(lines 162–164) and each callsConfigManager.load(). This reads and parses the YAML config file twice on every ViewModel creation. Consider loading the config once and sharing the result, or havingloadAcpAgentsaccept the already-loaded wrapper.Sketch: share the loaded config
init { - loadConfiguration() - loadAcpAgents() + loadConfigurationAndAgents() } +private fun loadConfigurationAndAgents() { + coroutineScope.launch(Dispatchers.IO) { + try { + val wrapper = ConfigManager.load() + // ... existing loadConfiguration logic using wrapper ... + // ... existing loadAcpAgents logic using wrapper ... + } catch (e: Exception) { ... } + } +}
| toolWindow.addComposeTab("Agent") { | ||
| thisLogger().warn("IdeaAgentApp composable invoked") | ||
| IdeaAgentApp(viewModel, project, coroutineScope) | ||
| } |
There was a problem hiding this comment.
Logging inside the Compose tab lambda may fire on every recomposition.
The lambda passed to addComposeTab is a @Composable function. thisLogger().warn(...) at Line 79 will execute every time the Compose tree is rebuilt (which Jewel may do multiple times during init and on window resize/restore). This will generate repeated log entries with no new information.
Move this log before the addComposeTab call (already present at Line 77), or guard it with a LaunchedEffect(Unit) if you need it inside the composable scope.
Proposed fix: remove the log inside the composable
thisLogger().warn("Adding Compose tab to tool window...")
toolWindow.addComposeTab("Agent") {
- thisLogger().warn("IdeaAgentApp composable invoked")
IdeaAgentApp(viewModel, project, coroutineScope)
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| toolWindow.addComposeTab("Agent") { | |
| thisLogger().warn("IdeaAgentApp composable invoked") | |
| IdeaAgentApp(viewModel, project, coroutineScope) | |
| } | |
| toolWindow.addComposeTab("Agent") { | |
| IdeaAgentApp(viewModel, project, coroutineScope) | |
| } |
🤖 Prompt for AI Agents
In
`@mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/toolwindow/IdeaAgentToolWindowFactory.kt`
around lines 78 - 81, The warning log thisLogger().warn(...) is inside the
`@Composable` lambda passed to addComposeTab and will run on every recomposition;
remove that log from inside the lambda and either move the logging statement
before the addComposeTab call (where the surrounding non‑composable scope
exists) or, if you must log from within the composable scope, wrap the log in a
LaunchedEffect(Unit) so it only runs once; update references to IdeaAgentApp and
the lambda accordingly.
Summary
Add support for Auggie (Augment Code's AI agent) as an ACP agent in AutoDev.
Changes
Core Code
Documentation
How It Works
Auggie uses standard ACP JSON-RPC protocol and works with existing
JvmAcpConnectionimplementation. No special handling required (unlike Claude which needs special stream-json mode).Configuration Example
Testing
✅ All tests passing
✅ Build successful
✅ Configuration verified
✅ ACP protocol tested
Usage
brew install augment-code/tap/auggie~/.autodev/config.yaml(see example above)Related Issues
Closes #536
Documentation
mpp-ui/docs/auggie-acp-setup.mdmpp-ui/docs/acp-agents-overview.mdPull Request opened by Augment Code with guidance from the PR author
Summary by CodeRabbit