[PR #5382] fix: make time optional in session update endpoint #11372

Closed
opened 2026-02-16 18:16:12 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5382

State: closed
Merged: No


Summary

The time field in the PATCH /session/:sessionID endpoint was required, but callers like DialogSessionRename only send title when renaming a session. This caused validation failures.

Fixes #5369

Changes

  • Made time optional in the session update request body schema
  • Regenerated SDK to reflect the change

Why this fix

This is a PATCH endpoint for partial updates - both title and time.archived are independent optional fields. The handler already used optional chaining (updates.time?.archived) expecting time to be undefined.


This PR was written with AI assistance (Claude Opus 4.5 via OpenCode).

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5382 **State:** closed **Merged:** No --- ## Summary The `time` field in the PATCH `/session/:sessionID` endpoint was required, but callers like `DialogSessionRename` only send `title` when renaming a session. This caused validation failures. Fixes #5369 ## Changes - Made `time` optional in the session update request body schema - Regenerated SDK to reflect the change ## Why this fix This is a PATCH endpoint for partial updates - both `title` and `time.archived` are independent optional fields. The handler already used optional chaining (`updates.time?.archived`) expecting `time` to be undefined. --- *This PR was written with AI assistance (Claude Opus 4.5 via OpenCode).*
yindo added the pull-request label 2026-02-16 18:16:12 -05:00
yindo closed this issue 2026-02-16 18:16:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11372