Skip to content

Add session/setTitle method#1199

Open
daniel-agentee wants to merge 1 commit into
agentclientprotocol:mainfrom
daniel-agentee:session-set-title
Open

Add session/setTitle method#1199
daniel-agentee wants to merge 1 commit into
agentclientprotocol:mainfrom
daniel-agentee:session-set-title

Conversation

@daniel-agentee
Copy link
Copy Markdown

@daniel-agentee daniel-agentee commented May 14, 2026

Summary

Adds session/setTitle to the Agent Client Protocol, giving clients a standard way to ask an agent to rename an existing session.

Request:  { sessionId: SessionId, title: String }
Response: {}

Title is plain UTF-8. Empty string remains valid at the protocol level so agents can decide whether that means "clear", "reset", or "use an empty title".

Why

Zed's first-party agent can already rename sessions, but ACP-backed sessions cannot, because there is no protocol method for the client to push a new title to the agent. The user-visible symptom is that the title editor in the agent panel appears for ACP threads but the rename cannot be persisted.

SessionInfoUpdate already exists in the reverse direction (agent -> client) and carries title -- this PR adds the missing client -> agent half of the round-trip.

How

  • Adds SetSessionTitleRequest and SetSessionTitleResponse to the generated v1 and v2 agent schemas.
  • Adds SESSION_SET_TITLE_METHOD_NAME = "session/setTitle" to the generated metadata.
  • Wires v2-to-v1 and v1-to-v2 conversion for the new request/response while keeping removed v1 session/set_mode variants non-convertible to v2.
  • Updates generated schema docs and JSON schema artifacts.
  • Extends the schema generator's generated-type set for SetSessionTitle.

Tests

npm run generate
npm run check

npm run check covers clippy with all features, Prettier/cargo formatting checks, spellcheck, all-feature unit tests, generated-bin tests, and doctests.

Companion PRs

Companion codex-acp PRs:

@ignatov
Copy link
Copy Markdown
Contributor

ignatov commented May 31, 2026

@benbrandt @anna239, I believe it makes sense to decide on that PR on the next meeting

@daniel-agentee
Copy link
Copy Markdown
Author

Rebased onto current main and regenerated schema/docs. Local validation is green: npm run generate and npm run check.

@codex review

@daniel-agentee
Copy link
Copy Markdown
Author

Updated the branch to include sessionCapabilities.setTitle alongside the session/setTitle method. Regenerated schema/docs and reran npm run generate plus npm run check (clippy, format check, spellcheck, tests, doctests) successfully.

@codex review

daniel-agentee added a commit to daniel-agentee/rust-sdk that referenced this pull request Jun 2, 2026
Wires the SetSessionTitleRequest / SetSessionTitleResponse types into
the agent-side JSON-RPC dispatch tables.

Companion to agentclientprotocol/agent-client-protocol#1199,
which adds the schema definitions for session/setTitle. This PR is the
Rust SDK half of the round trip: once the schema crate ships a release
with the new types, ACP-backed agents can implement Agent::set_session_title
and have it dispatched here.
daniel-agentee added a commit to daniel-agentee/rust-sdk that referenced this pull request Jun 2, 2026
Wires the SetSessionTitleRequest / SetSessionTitleResponse types into
the agent-side JSON-RPC dispatch tables.

Companion to agentclientprotocol/agent-client-protocol#1199,
which adds the schema definitions for session/setTitle. This PR is the
Rust SDK half of the round trip: once the schema crate ships a release
with the new types, ACP-backed agents can implement Agent::set_session_title
and have it dispatched here.
daniel-agentee added a commit to daniel-agentee/rust-sdk that referenced this pull request Jun 2, 2026
Wires the SetSessionTitleRequest / SetSessionTitleResponse types into
the agent-side JSON-RPC dispatch tables.

Companion to agentclientprotocol/agent-client-protocol#1199,
which adds the schema definitions for session/setTitle. This PR is the
Rust SDK half of the round trip: once the schema crate ships a release
with the new types, ACP-backed agents can implement Agent::set_session_title
and have it dispatched here.
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