[FEATURE] Support negotiated Org/Portable Org output formats

Status Open
Maintainer reply None cached
Activity 0 comments · opened Oct 6, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Claude Code currently documents --output-format as text, json, and stream-json. That provides machine-readable envelopes, but clients such as Emacs Org-mode cannot request a stable, renderable Org representation. Prompting the model to emit Org syntax is unreliable across streaming chunks and tool results, and there is no format/profile metadata that a client can negotiate or preserve.

Proposed Solution

Add an optional text/org output format with a portable profile. The client should be able to advertise accepted formats, negotiate text/org when both sides support it, and preserve the selected format/profile across streaming events and replay. Unsupported clients should continue to receive text, Markdown, or JSON according to the existing behavior. Please align the wire-level contract with the ACP RFD: https://github.com/agentclientprotocol/agent-client-protocol/pull/2315. Existing text, json, and stream-json formats must remain compatible.

Alternative Solutions

Prompting the model to emit Org, converting Markdown after the final response, or using a client-specific hook are useful experiments but do not provide a stable cross-client contract or reliable streaming semantics.

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

An ACP client running in Emacs wants to render agent replies natively as Org-mode while the response is still streaming. It advertises text/org with the portable profile, the agent selects it, and the client renders headlines, paragraphs, lists, links, tables, and safe static blocks incrementally. If the agent does not support it, the client falls back to Markdown or plain text without breaking the session.

Additional Context

This request is about a negotiated output contract, not only a prompt instruction. The ACP proposal is tracked at https://github.com/agentclientprotocol/agent-client-protocol/pull/2315. A portable profile intentionally covers a small interoperable subset of Org-mode rather than the full Emacs Org language.

View original on GitHub ↗