- Author(s): @ignatov
Elevator pitch
Add asession_info_update variant to the existing SessionUpdate notification type that allows agents to update session metadata (particularly title/name), enabling dynamic session identification in client UIs without requiring a new endpoint.
Status quo
Currently, the ACP protocol provides session management throughsession/new, session/load, and session/list (unstable). The session/list endpoint returns SessionInfo objects that include an optional title field for displaying session names in client UIs.
However, there are several problems:
-
No way to communicate title updates - The
titlefield inSessionInfois static in the list response. Agents cannot dynamically update it as the session evolves. -
No mechanism for real-time metadata updates - Unlike commands (
available_commands_update) or modes (current_mode_update), there’s no way for agents to:- Auto-generate titles after the first meaningful exchange
- Update titles as conversation context shifts
- Provide custom metadata that reflects session state
-
Inconsistent with protocol patterns - Other dynamic session properties use
session/updatenotifications (commands, modes, plans), but metadata has no equivalent mechanism.
- Maintain their own title mapping (doesn’t persist or sync)
- Only show static metadata from
session/list - Have no way to receive agent-generated titles in real-time
What we propose to do about it
Add a newsession_info_update variant to the existing SessionUpdate discriminated union that allows agents to notify clients about metadata changes. This update would:
-
Follow the existing
SessionUpdatepattern:- Uses the same notification mechanism as
available_commands_update,current_mode_update, etc. - Sent via
session/updatemethod - Agent-initiated, no request/response needed
- Uses the same notification mechanism as
-
Align with
SessionInfostructure:- Contains the same fields as
SessionInfofromsession/list - All fields are optional (partial updates)
- Enables incremental metadata updates
- Important:
SessionInfoUpdatemust stay aligned withSessionInfo- when new fields are added toSessionInfo, they should also be added toSessionInfoUpdateas optional fields
- Contains the same fields as
-
Support common use cases:
- Agent auto-generates title after first prompt
- Agent updates title as conversation context shifts
- Agent provides custom metadata for client features (tags, status, etc.)
- User explicitly requests title change (agent responds with update notification)
-
Integrate seamlessly:
- No new capability required (uses existing
session/updatemechanism) - Compatible with
session/list- metadata should persist and be reflected in list responses - Works during active sessions
- No new capability required (uses existing
Notification Structure
The agent sends asession/update notification with sessionUpdate: "session_info_update":
SessionInfoUpdate Type
The update type mirrorsSessionInfo but with all fields optional:
sessionId and cwd are NOT included since:
sessionIdis already in the notification’sparamscwdis immutable and set duringsession/new
Examples
Update title and working directory metadata
After the user sends their first meaningful prompt, the agent can generate and send a title along with metadata about the working directory:Update title as conversation evolves
As the conversation shifts focus:Shiny future
Once this feature exists:-
Dynamic session identification - Agents can:
- Auto-generate meaningful titles from conversation content
- Update titles as conversations evolve
- Provide rich metadata for better organization
-
Improved client UIs - Clients can:
- Show real-time title updates in session lists
- Display session status, tags, or other metadata
- Update UI immediately without polling
session/list
- Consistent protocol patterns - Session metadata updates work like other dynamic session properties (commands, modes), creating a unified model
-
Bidirectional workflows - Combined with a potential future request method:
- User renames session → client sends request → agent acknowledges with
session_info_updatenotification - Agent auto-generates title → sends
session_info_updatenotification → client displays it
- User renames session → client sends request → agent acknowledges with
-
Enhanced use cases:
- Session templates that auto-set titles and tags
- Progress indicators via
_meta - Integration with external tools via metadata
- Rich session browsing and filtering
Implementation details and plan
Phase 1: Schema Changes
- Update
schema.unstable.json:- Add
SessionInfoUpdatetype definition - Add new variant to
SessionUpdateoneOf array - Align fields with
SessionInfobut make all optional
- Add
SessionUpdate oneOf:
Phase 2: Protocol Documentation
-
Create documentation in
/docs/protocol/session-metadata.mdx:- Explain the notification mechanism
- Provide examples of common patterns
- Document merge semantics for
_meta - Clarify relationship with
session/list
-
Update existing docs:
- Reference in
/docs/protocol/session-setup.mdx - Add to
/docs/protocol/prompt-turn.mdxsession update section
- Reference in
Phase 3: SDK Implementation
-
Implement in Rust SDK:
- Add
SessionInfoUpdatestruct - Add variant to
SessionUpdateenum - Update notification handling in agent and client traits
- Add helper methods for common patterns
- Add
-
Implement in TypeScript SDK (if applicable):
- Add TypeScript types
- Update notification handlers
- Add helper methods
Phase 4: Example Implementation
- Update example agents:
- Demonstrate auto-generating title from first prompt
- Show updating metadata during session
- Example of using
_metafor custom fields
Compatibility Considerations
- Fully backward compatible: This adds a new notification variant to an existing mechanism
- No breaking changes: Existing agents and clients continue working
- Graceful degradation: Clients that don’t handle this notification simply ignore it
- No new capability needed: Uses existing
session/updateinfrastructure
Design Decisions
Why notification instead of request/response?- Consistent with existing
SessionUpdatepatterns (available_commands_update,current_mode_update) - Agents initiate updates based on conversation state
- Simpler than bidirectional request/response
- Enables real-time updates without polling
- Allows partial updates (only update what changed)
- More efficient - don’t resend unchanged data
- Flexible for different use cases
- Mirrors partial update patterns in other protocols
sessionId and cwd in the update?
sessionIdis already in the notification paramscwdis immutable (set insession/new, never changes)- Keeps update focused on mutable metadata
_meta updates work?
- Merge semantics: New
_metafields are merged with existing ones - To clear a specific field:
"_meta": { "fieldName": null } - To clear all custom metadata:
"_meta": null
Security Considerations
- No additional security concerns: Uses existing session authentication
- Input validation:
- Agents should validate title length (recommend 500 chars max)
- Sanitize metadata to prevent injection
- Validate
_metastructure based on agent requirements
- Resource limits: Agents should limit update frequency and metadata size
Frequently asked questions
Why not create a new endpoint like session/update-metadata?
The notification pattern is more appropriate because:
- Consistency: Other dynamic session properties (commands, modes) use notifications
- Agent-initiated: Agents typically generate titles from conversation context
- Real-time: No request/response overhead, updates flow naturally
- Simpler: Reuses existing
session/updateinfrastructure
How does this work with session/list?
The updated metadata should persist and be reflected in subsequent session/list calls. The notification provides real-time updates to connected clients, while session/list provides the current state for discovery.
Can clients trigger title updates?
This RFD covers agent-initiated updates. Client-initiated updates could work by:- Client sends a prompt asking to rename session
- Agent updates its internal state
- Agent sends
session_info_updatenotification - Client receives and displays the update
What if multiple updates are sent in quick succession?
Clients should apply updates incrementally in order. Each notification represents a delta, not a full replacement (except for fields explicitly set tonull).
Should updatedAt be automatically set by the agent?
Yes, typically the agent should update this timestamp when any session activity occurs, not just when metadata changes. However, including it in session_info_update allows agents to explicitly control it if needed.
Do agents need a new capability for this?
No. All agents that supportsession/update notifications can send this variant. Clients that don’t recognize it will ignore it (standard JSON-RPC behavior).
How does this interact with session/fork?
When forking, the parent session’s metadata could be copied (implementation choice). The forked session would have its own sessionId and could receive separate session_info_update notifications.
What happens if title is too long?
This is an implementation choice. Agents MAY:- Truncate long titles
- Reject updates (though this is a notification, so no error response)
- Set a reasonable limit (e.g., 500 characters)
Can _meta have nested objects?
Yes, _meta is an arbitrary object. Agents define its structure. The merge semantics apply recursively - nested objects are merged, not replaced entirely.
What alternative approaches did you consider, and why did you settle on this one?
Several alternatives were considered:-
Add a new request/response endpoint (
session/update-metadata) - This would be inconsistent with how other dynamic session properties (commands, modes) are handled. The notification pattern is more appropriate for agent-initiated updates. -
Add title parameter to
session/new- Only allows setting title at creation time, doesn’t support dynamic updates as the conversation evolves. - Client-side only metadata tracking - Doesn’t work across devices, can get out of sync, and duplicates storage. This is the current workaround and has significant limitations.
-
Generic
session/updaterequest for all properties - Could conflict with immutable properties (sessionId, cwd) and has unclear semantics about what can be updated.
- Consistent with existing protocol patterns
- Flexible for both agent-initiated and user-initiated updates
- Simple to implement and understand
- Extensible via
_metafield
Revision history
- 2025-11-28: Initial draft proposal