Skip to content

#21568 — POST /session ignores explicit id so duplicate-id handling is unreachable #767

@ElioNeto

Description

@ElioNeto

Description

POST /session accepts an explicit id in the typed API surface, but the server-side session create path ignores it. That makes duplicate-ID hardening unreachable: creating the same explicit session id twice returns 200 twice instead of 200 then 409.

The server already exposes DuplicateIDError / 409 handling, but Session.create does not pass id through to the underlying session creation flow.

Plugins

No response

OpenCode version

0.0.0--202604082020 (reproduced on built local binary)

Steps to reproduce

  1. Start the built server with basic auth enabled.
  2. POST /session with body { "id": "ses_duplicate_smoke", "title": "one" }.
  3. Repeat the same request with the same id.
  4. Observe that the second request succeeds instead of returning 409 DuplicateIDError.

Screenshot and/or share link

No response

Operating System

Ubuntu 24.04

Terminal

Ghostty

Metadata

Metadata

Assignees

No one assigned

    Labels

    DORDefinition of Ready — issue meets readiness criteriabugSomething isn't workinghigh

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions