Skip to content

feat: add optional systemPrompt field to session/new#1494

Draft
wpfleger96 wants to merge 2 commits into
agentclientprotocol:mainfrom
wpfleger96:wpfleger/acp-system-prompt-field
Draft

feat: add optional systemPrompt field to session/new#1494
wpfleger96 wants to merge 2 commits into
agentclientprotocol:mainfrom
wpfleger96:wpfleger/acp-system-prompt-field

Conversation

@wpfleger96

@wpfleger96 wpfleger96 commented Jun 23, 2026

Copy link
Copy Markdown

Adds an optional systemPrompt: Option<String> field to NewSessionRequest (session/new), giving clients a standard way to deliver system-level instructions to an agent at session creation.

The semantics are additive: agents incorporate the content alongside their own built-in instructions rather than replacing them, and an agent that ignores the field behaves exactly as before. The field is optional and backward compatible. Per the field's contract, an agent that cannot incorporate the system prompt MUST return a JSON-RPC error and MUST NOT create the session.

This is the reference implementation of the RFD in #1237.

Changes

  • src/agent.rssystem_prompt: Option<String> on NewSessionRequest, a system_prompt(...) builder, and round-trip + absent-omission serialization tests.
  • schema/schema.json, schema/schema.unstable.json, docs/protocol/schema.mdx, docs/protocol/draft/schema.mdx — regenerated so the published artifacts match the Rust types.
  • docs/protocol/session-setup.mdx, docs/protocol/draft/session-setup.mdx — added systemPrompt to the parameter bullet list and JSON-RPC example in the narrative docs.

The field serializes as systemPrompt on the wire and is omitted entirely when absent.

Related: #1237 (the RFD this implements) and the consuming goose change aaif-goose/goose#9971.

Reference implementation of the Client-Provided System Prompt RFD.
Adds an optional `systemPrompt: Option<String>` to NewSessionRequest,
letting clients deliver system-level instructions to an agent at session
creation. Semantics are additive: agents incorporate the content alongside
their own built-in instructions rather than replacing them. The field is
optional and backward compatible — agents that ignore it behave unchanged.

Regenerates the committed JSON Schema and protocol docs so the published
artifacts match the Rust types.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
@wpfleger96 wpfleger96 marked this pull request as ready for review June 23, 2026 23:15
@wpfleger96 wpfleger96 requested a review from a team as a code owner June 23, 2026 23:15
@wpfleger96 wpfleger96 marked this pull request as draft June 23, 2026 23:15
The schema docs already document the field, but the narrative
session-setup pages still listed only cwd and mcpServers.
@jalr4ever

Copy link
Copy Markdown

Hope this work can progress quickly.

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