Skip to content

Conversation

@luca-context
Copy link

@luca-context luca-context commented Dec 19, 2025

Adds an ACP stdio server command to the Continue CLI, including prompt/tool mapping utilities and docs for Zed ACP setup.


Summary by cubic

Add an ACP stdio server to the Continue CLI so Zed and other ACP editors can use Continue for streaming chat and tool execution. Introduces a hidden cn acp subcommand, prompt/tool mapping utilities, and setup docs.

  • New Features

    • New acp subcommand runs an ACP server over stdio.
    • Supports initialize, session/new, session/prompt, session/cancel, and session/set_mode.
    • Streams assistant chunks and tool lifecycle updates (pending/in_progress/completed/failed) with concise titles and kinds; tools auto-approved unless --readonly is used.
    • Converts ACP prompt blocks to text and context items, including resource and resource_link handling.
    • Single in-flight prompt across sessions with cancel support; session history preserved; headless mode detection updated.
    • Docs added at docs/cli/acp.mdx and linked in docs.json.
  • Migration

    • In Zed settings.json, add an External Agent: command "cn", args ["acp"].
    • Optional flags: --readonly, --config /path/to/config.yaml.
    • Ensure a valid Continue model config; client-provided MCP servers are ignored—configure them in Continue instead.

Written for commit e39c881. Summary will update automatically on new commits.

@continue
Copy link
Contributor

continue bot commented Dec 19, 2025

All Green - Keep your PRs mergeable

Learn more

All Green is an AI agent that automatically:

✅ Addresses code review comments

✅ Fixes failing CI checks

✅ Resolves merge conflicts


Unsubscribe from All Green comments

1 similar comment
@continue-development-app
Copy link

All Green - Keep your PRs mergeable

Learn more

All Green is an AI agent that automatically:

✅ Addresses code review comments

✅ Fixes failing CI checks

✅ Resolves merge conflicts


Unsubscribe from All Green comments

@github-actions
Copy link

github-actions bot commented Dec 19, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@continue
Copy link
Contributor

continue bot commented Dec 19, 2025

Documentation Enhancement Suggestion

I've reviewed the ACP documentation added in this PR and created some enhancements using Mintlify components to improve readability and user experience. Since this is from a fork, I can't create a PR directly against your branch.

Here's a summary of the suggested improvements to docs/cli/acp.mdx:

Changes Made

  • ✨ Added Info callout to highlight ACP server benefits at the start
  • 📋 Converted requirements list to Steps component for clearer onboarding flow
  • 📚 Used CodeGroup to organize configuration examples (Basic, Read-only, Custom Config)
  • 🎯 Added Accordion component to explain configuration options
  • 🔧 Converted usage instructions to Steps component for better UX
  • ⚠️ Enhanced notes section with appropriate Warning, Note, and Info callouts
  • 🎨 Improved overall visual hierarchy and readability

Why These Enhancements?

The original documentation is comprehensive and clear! These changes simply leverage Mintlify's UI components to:

  • Make critical information (like tool permissions) more prominent with callouts
  • Provide a clearer step-by-step flow for setup and usage
  • Better organize multiple configuration examples side-by-side
  • Match the visual style and patterns used in other Continue documentation

View the Changes

You can see the enhanced version on my branch: docs/acp-documentation-enhancements

Or view the diff here: pr-9222...docs/acp-documentation-enhancements

Feel free to cherry-pick the commit if you'd like to include these enhancements:

git fetch origin docs/acp-documentation-enhancements
git cherry-pick da9779b4e

Let me know if you'd like me to make any adjustments or if you'd prefer a different approach!

@luca-context luca-context marked this pull request as ready for review December 19, 2025 19:07
@luca-context luca-context requested a review from a team as a code owner December 19, 2025 19:07
@luca-context luca-context requested review from Patrick-Erichsen and removed request for a team December 19, 2025 19:07
@luca-context
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Dec 19, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 12 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="extensions/cli/src/commands/acp.ts">

<violation number="1" location="extensions/cli/src/commands/acp.ts:17">
P2: Using `process.exit(1)` directly bypasses telemetry and Sentry flushing. Consider using `gracefulExit(1)` from `../util/exit.js` to ensure error tracking data is not lost, consistent with other commands like `login.ts` and `remote-test.ts`.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Ask questions if you need clarification on any suggestion

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

} catch (error) {
const message = error instanceof Error ? error.message : String(error);
safeStderr(`ACP server failed: ${message}\n`);
process.exit(1);
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 19, 2025

Choose a reason for hiding this comment

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

P2: Using process.exit(1) directly bypasses telemetry and Sentry flushing. Consider using gracefulExit(1) from ../util/exit.js to ensure error tracking data is not lost, consistent with other commands like login.ts and remote-test.ts.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At extensions/cli/src/commands/acp.ts, line 17:

<comment>Using `process.exit(1)` directly bypasses telemetry and Sentry flushing. Consider using `gracefulExit(1)` from `../util/exit.js` to ensure error tracking data is not lost, consistent with other commands like `login.ts` and `remote-test.ts`.</comment>

<file context>
@@ -0,0 +1,19 @@
+  } catch (error) {
+    const message = error instanceof Error ? error.message : String(error);
+    safeStderr(`ACP server failed: ${message}\n`);
+    process.exit(1);
+  }
+}
</file context>
Fix with Cubic

@continue
Copy link
Contributor

continue bot commented Dec 19, 2025

Update: Code Review Fix Applied

I've also addressed the code review feedback from cubic regarding the acp.ts command:

Issue Fixed

  • Replace process.exit(1) with gracefulExit(1) in the error handler

This ensures:

  • ✅ Telemetry data is properly flushed before exit
  • ✅ Sentry error reports are sent for debugging
  • ✅ Session usage is displayed in verbose mode
  • ✅ Aligns with the pattern used in other CLI commands

The fix has been pushed to my branch alongside the documentation enhancements. You can cherry-pick both commits:

git fetch origin docs/acp-documentation-enhancements
git cherry-pick da9779b4e  # Documentation enhancements
git cherry-pick 5fa179cbb  # gracefulExit fix

Or merge the entire branch if you prefer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant