Skip to content

OPE-272: Catch up with OpenCode API changes (3 breaking on 2.0.x + gaps) #546

Closed

Description

@ivanfenenko

Baseline comparison of upstream anomalyco/opencode against opencode-mobile main (d54641b, Oct 3). Upstream checked at v2 10b11ba, dev ecc4916, beta e5ecb57.

Applies to both apps: Android android/.../data/remote/*Api.kt and iOS ios/.../Data/Remote/*APIClient.swift, with events handled in EventDomainAdapter (Kotlin + Swift).

Breaking on 2.0.x (app is broken today)

  • QR pairing (changed Sep 24). opencode pair now encodes {code, urls} with no username or password, so the QR parser ends up with an empty password. Fix: call GET /auth/connect/{code} with Accept: application/json to get {token}, then use the token as the password for user opencode (it is valid for 30 days).
  • Steer/queue for queued prompts (removed Sep 15, also on beta). POST /api/session/{id}/inbox/{inboxID}/steer and /queue are gone. Fix: use PATCH /api/session/{id}/inbox/{inboxID} with {delivery}.
  • Fork at message on v2 (changed Sep 14). The body changed from {boundary:{type,messageID}} to {before: msg_…}. Fix: send before. Server behaviour with the old body was not checked.

Dead or deprecated calls

  • On 2.0.x, stop calling /api/question/* (removed Aug 14; the app currently 404s each time and then falls back to forms), /api/health (merged into /api/info) and /api/session/{id}/archive (not in the spec).
  • On v1, move permission replies from the deprecated POST /session/{id}/permissions/{pid} to POST /permission/{requestID}/reply.

Missing features that are now available on v2

  • Per-turn diff: GET /api/session/{id}/diff (since Sep 12). The app still shows "not available", so wire it into Review Changes.
  • Sub-sessions: POST /api/session accepts parentID (since Sep 30), but the app drops it. Pass it through.
  • Session errors carry a new response field holding the provider error body (Sep 29). Show it to the user.
  • form.replied answer format changed. Check decoding.
  • Session metadata editing and the session.metadata.updated event.
  • Project.time.active is now required. Check models.

Nice to have

  • GET /api/session/{id}/context could replace the on-device context estimate.
  • Persistent terminals: /api/info now reports support for them (Oct 2).
  • /api/fs/read with HTTP Range streaming (Oct 6) would allow a file viewer.
  • Other recent additions: /api/credential list and create (Oct 6), /api/vcs/init (Oct 2), a message parameter on form cancel (Sep 30), and a 404 when a project folder is missing (Oct 2).

Notes

  • On iOS, only SessionsAPIClient.swift and EventDomainAdapter.swift were checked line by line; the other iOS clients are assumed to match Android.
  • A daily tracker keeps statuses up to date and reports new upstream API changes on weekday mornings.

Imported from Linear OPE-272. Linear status: Done. Priority: High. Created 2026-10-07. Completed 2026-10-07.
Related: OPE-277, OPE-276, OPE-275, OPE-273.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: high

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions