Generate Preview Artifact in Xcode 27 Agentic AI

Been working for several days trying to figure out a solution. I'm building a plugin to bring in OpenRouter into Xcode so you can choose pretty much whatever cloud LLM you want easily. One thing I'm having trouble with is artifacts in the right hand pane. Specifically in /plan mode.

Currently, it will write the plan in the transcript, it will even create a markdown card, but it will not put it in the artifact pane for preview and inline comment annotation for the next prompt.

I can't seem to find the answer. Any help would be appreciated.

Each coding agent has different support requirements for how it writes out plans. If you are using an ACP-based coding agent, it may not emit the signals we look for to understand when a plan has been written out. We are happy to special case some of these other ACP agents if we receive information about them.

Which agent are you using?

@Developer Tools Engineer

Thank you. I’m building a custom ACP-based coding agent that I’m currently calling TaylorACP. It is not a publicly released agent; it is a project I’m developing to connect Xcode to hosted models through OpenRouter.

The agent already supports Xcode’s normal ACP session flow, plan mode, transcript streaming, tool calls, filesystem access, source edits, diff artifacts, and permission requests.

For plans, I have tested:

  • ACP v1 session/update with sessionUpdate: "plan" and structured entries
  • ACP v2 session/update with sessionUpdate: "plan_update" and an item-based plan
  • plan_update containing the completed Markdown plan
  • A switch_mode tool call with session/request_permission

The plan text appears in the conversation transcript, and some attempted payloads produce a Markdown/card-style item. However, the completed plan does not appear as the native editable Markdown artifact in Xcode’s right-side artifact pane.

The switch_mode flow correctly produces the “Ready to code?” approval prompt, but it does not first create the editable plan artifact. Edit or diff tool calls create normal source-file artifacts rather than a plan artifact.

Because this is a custom agent I am building, I can modify its ACP output to emit whatever signal Xcode requires. I can also provide a minimal reproduction or protocol trace showing the exact messages it currently sends.

What exact ACP signal or message sequence does Xcode expect from a custom agent to indicate that a plan is complete and should appear as an editable Markdown artifact in the artifact pane?

Generate Preview Artifact in Xcode 27 Agentic AI
 
 
Q