Skip to content

feat(acp-client): expose session title, model state, and config options#559

Merged
matt2e merged 2 commits intomainfrom
individual-chats
Mar 31, 2026
Merged

feat(acp-client): expose session title, model state, and config options#559
matt2e merged 2 commits intomainfrom
individual-chats

Conversation

@matt2e
Copy link
Copy Markdown
Contributor

@matt2e matt2e commented Mar 31, 2026

Summary

  • Add MessageWriter callbacks for session info updates, model state, and config option changes
  • Forward SessionInfoUpdate and ConfigOptionUpdate notifications from ACP sessions
  • Surface model state and config options from NewSessionResponse and LoadSessionResponse
  • Re-export new ACP types (SessionInfoUpdate, SessionModelState, SessionConfigOption, etc.)

Test plan

  • Verify existing tests pass with the new MessageWriter trait methods (default impls ensure backward compat)
  • Confirm session info and config option notifications are forwarded to the writer
  • Confirm model state from session setup responses reaches the writer

🤖 Generated with Claude Code

matt2e and others added 2 commits March 31, 2026 16:29
Extend the MessageWriter trait with default callbacks for session
metadata events (title updates, model state, config option changes) and
wire them through both the notification handler and session setup so
consumers can react to these ACP protocol features.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Broaden `on_session_title_update` to `on_session_info_update` so
consumers receive the entire `SessionInfoUpdate` (including
`updated_at`), not just the title. Correct the `on_model_state_update`
doc comment to reflect that `SessionModelState` is only delivered in
setup responses, not via notifications.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matt2e matt2e requested review from baxen and wesbillman as code owners March 31, 2026 05:49
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e39edc22c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +853 to +857
// Session metadata events are forwarded regardless of phase.
match &notification.update {
SessionUpdate::SessionInfoUpdate(info) => {
self.writer.on_session_info_update(info).await;
return Ok(());
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve replay bookkeeping for metadata notifications

Avoid returning before phase handling for SessionInfoUpdate/ConfigOptionUpdate during resume. In Replaying, the bookkeeping that marks received_any and refreshes last_notification_at now never runs for these updates, so run_acp_protocol cannot satisfy is_replay_idle and falls back to the 10s absolute timeout when the replay stream contains only metadata events. That adds a deterministic startup delay on resumed sessions for agents that replay title/config updates without message/tool chunks.

Useful? React with 👍 / 👎.

@matt2e matt2e merged commit dbd5bc9 into main Mar 31, 2026
6 checks passed
@matt2e matt2e deleted the individual-chats branch March 31, 2026 05:53
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.

1 participant