Skip to content

OPE-181: Live-update session context from TUI v2 usage events #613

Closed

Description

@ivanfenenko

On a v2 server, Session Chat context / token usage should update while a turn runs, without leaving and re-entering the session.

TUI v2 patches cost and tokens from session.usage.updated and can refresh the turn footer from session.step.ended. Mobile only loads context over REST, so the bar stays stale during a live v2 turn.

Parent

OPE-146 — Server API v2 Compatibility

Comparison: http://ivan-m2.local:8787/2026-08-18/2210-sse-event-sync--tui-v1--v2--mobile/

What to build

While a v2 session is open, context usage (tokens / cost as the product already shows) updates from live usage events. Reconnect still refreshes from REST. v1 context loading stays as it is. Both platforms.

Acceptance criteria

  • session.usage.updated patches the open session’s context usage
  • The Session Chat context chrome updates without a manual refresh
  • Reconnect / server.connected still reseeds from REST
  • v1 context behavior is unchanged
  • iOS and Android stay in parity

Blocked by

None — can start immediately.


Imported from Linear OPE-181. Linear status: Done. Priority: Medium. Created 2026-08-18. Completed 2026-08-19.
Parent: OPE-183.
Related: OPE-193, OPE-183.

Activity

  1. self-assigned this
    on Oct 11, 2026
  2. added
    enhancement
    ios
    android
    shared
    on Oct 11, 2026
  3. added
    priority: medium
    ready-for-agent
    on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

androidenhancementiospriority: mediumready-for-agentshared

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions