Skip to content

fix(acp): omit sessionId from loadSession response#14852

Closed
zerone0x wants to merge 1 commit intoanomalyco:devfrom
zerone0x:fix/14746-remove-session-id-from-load-session-response
Closed

fix(acp): omit sessionId from loadSession response#14852
zerone0x wants to merge 1 commit intoanomalyco:devfrom
zerone0x:fix/14746-remove-session-id-from-load-session-response

Conversation

@zerone0x
Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #14746

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The ACP spec's LoadSessionResponse does not include a sessionId field. However, loadSession() was returning the raw object from the private loadSessionMode() helper, which includes sessionId. In contrast, newSession() correctly constructs its own return with sessionId explicitly included.

Fixed by making loadSession() return only the fields defined by the ACP spec (models, modes, _meta), dropping sessionId.

How did you verify your code works?

Traced the call path manually:

  • loadSessionMode() returns { sessionId, models, modes, _meta }
  • newSession() destructures and adds its own sessionId
  • loadSession() was returning result directly; now returns { models, modes, _meta }

Screenshots / recordings

N/A — backend-only change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

The ACP spec's LoadSessionResponse does not include a sessionId field,
but loadSession() was returning the raw result from loadSessionMode()
which includes sessionId. newSession() correctly constructs its own
return object with sessionId; loadSession() should explicitly omit it.

Fixes anomalyco#14746

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opencode returns sessionId for session/load ACP request

1 participant