Skip to content

v2: unconsumed server events — agent.selected, revert.committed, compaction.ended #527

Closed

Description

@jensenojs

While checking what else the server broadcasts (after #508 added session.model.selected), I diffed the event types in upstream's session-event.ts (2.0.28) against what the plugin actually consumes. Three gaps:

  • session.agent.selected — added upstream in the same change as session.model.selected (feat(acp): follow model and agent changes from other clients anomalyco/opencode#52499, shipped in 2.0.22). We follow model switches but not agent switches, so switching agent in the TUI leaves the nvim side stale until the panel reopens.
  • session.revert.committed — on the server this deletes messages for real (the projector removes rows from the boundary onward), so an undo in the TUI while the panel is open leaves us showing reverted messages until reopen.
  • session.compaction.ended — same class: compaction rewrites the message set, and auto-compaction can fire while the panel is open. We never react, so the list goes stale.

The remaining unconsumed types look fine to ignore (session.usage.recorded never reaches clients, session.message.content.updated is replay-only, the rest have no surface in nvim).

Happy to send a PR. agent.selected is a one-liner next to the existing model handler; revert/compaction probably just need to invalidate the messages sync so it re-pulls.

Activity

  1. self-assigned this
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions