Skip to content

Conversation

@lambertjosh
Copy link
Contributor

Context

Exploration of ACP support for Kilo Code.

Implementation

See docs in PR. General approach is to add ACP support to the CLI, and to enable the behavior by using a flag.

Screenshots

before after

How to Test

See docs.

Get in Touch

@changeset-bot
Copy link

changeset-bot bot commented Dec 6, 2025

⚠️ No Changeset found

Latest commit: 474bdc4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

@kiloconnect kiloconnect bot left a comment

Choose a reason for hiding this comment

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

⚠️ 3 Issues Found

Severity Issue Location
WARNING Hardcoded local path in debug script cli/scripts/acp-debug.sh
WARNING yoloMode bypasses security approvals cli/src/acp/agent.ts:127
SUGGESTION Sessions never cleaned up (memory leak) cli/src/acp/agent.ts:135

Recommendation: Address the yoloMode security concern before merging to production. The hardcoded path should be fixed for portability.

Review Details (10 files)

Files: cli/src/acp/agent.ts (2 issues), cli/src/acp/index.ts, cli/src/acp/types.ts, cli/src/acp/tests/agent.test.ts, cli/src/index.ts, cli/scripts/acp-debug.sh (1 issue), cli/package.json, cli/package.dist.json, apps/kilocode-docs/docs/cli.md, pnpm-lock.yaml

Checked: Security, bugs, performance, error handling

Notes:

  • Good test coverage for the new ACP agent functionality
  • Documentation is comprehensive and well-structured
  • Error handling is present throughout the implementation
  • The ACP SDK integration follows reasonable patterns

Copy link

Choose a reason for hiding this comment

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

⚠️ WARNING: Hardcoded local path

This script contains a hardcoded path /Users/silv/projects/kilocode/cli/dist/index.js which is developer-specific. Consider using a relative path or $(dirname "$0")/../dist/index.js instead.


// TEMPORARY: Enable yoloMode to test if this unblocks LLM calls
// TODO: Remove this and properly handle approvals through ACP
const extensionHost = extensionService.getExtensionHost()
Copy link

Choose a reason for hiding this comment

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

⚠️ WARNING: Security concern - yoloMode bypasses approvals

Enabling yoloMode bypasses all tool approval prompts, which defeats the human-in-the-loop security model documented for ACP. The TODO comment acknowledges this, but this should be addressed before merging to production.

acpDebug("yoloMode enabled for testing")
} catch (error) {
const err = error as Error
acpDebug("Failed to create extension service:", err.message, err.stack)
Copy link

Choose a reason for hiding this comment

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

💡 SUGGESTION: Potential memory leak - sessions never cleaned up

Sessions are added to this.sessions Map but never removed. Consider implementing session cleanup on disconnect or adding a destroySession method to prevent memory growth over time.

Copy link

@kiloconnect kiloconnect bot left a comment

Choose a reason for hiding this comment

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

✅ No New Issues Found (Incremental Review)

13 files reviewed | Confidence: 90% | Recommendation: Address previous issues before merge

Previous Issues (Still Unresolved)

Severity Issue Location
WARNING Hardcoded local path in debug script cli/scripts/acp-debug.sh:3
WARNING yoloMode bypasses security approvals cli/src/acp/agent.ts:127
SUGGESTION Sessions never cleaned up (memory leak) cli/src/acp/agent.ts:135

The previous review correctly identified these issues. They should be addressed before merging to production.

Review Details (13 files)

Source Files:

  • cli/src/acp/agent.ts - ACP Agent implementation (2 previous issues)
  • cli/src/acp/index.ts - ACP entry point
  • cli/src/acp/types.ts - Type definitions
  • cli/src/index.ts - CLI flag additions
  • cli/src/host/ExtensionHost.ts - Message deduplication improvements
  • src/services/glob/list-files.ts - Ripgrep fallback (good defensive change)
  • src/core/tools/AttemptCompletionTool.ts - Parameter cleanup in handlePartial()

Config/Docs:

  • cli/package.json, cli/package.dist.json - Added @agentclientprotocol/sdk
  • apps/kilocode-docs/docs/cli.md - Comprehensive ACP documentation
  • pnpm-lock.yaml - Lock file update

Scripts:

  • cli/scripts/acp-debug.sh - Debug wrapper (1 previous issue)

Tests:

  • cli/src/acp/__tests__/agent.test.ts - Good test coverage for ACP agent

Checked: Security, bugs, performance, error handling

Notes:

  • The ACP implementation follows reasonable patterns
  • Test coverage is good for the new functionality
  • The ripgrep fallback in list-files.ts is a good defensive addition
  • ExtensionHost message deduplication improvements look correct

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.

2 participants