What happened?
Full-session forks can fail with a bad request when the client sends no JSON body.
The TUI full-session fork path calls session.fork({ sessionID }). The generated SDK strips the empty body when there is no messageID, but the HTTP API currently tries to parse the missing request body as JSON for /session/:sessionID/fork.
This produces a server-side request parse error:
POST /session/<id>/fork -> 400 RequestParseError
JSON Parse error: Unexpected EOF
In the TUI this can surface as a crash when the caller assumes forked.data.id exists after the failed request.
Expected behavior
POST /session/:sessionID/fork should accept an empty/no-content request body as a full-session fork, while still accepting { "messageID": "..." } for message-specific forks.
Notes
This appears to affect the full-session fork path added by #23339.
What happened?
Full-session forks can fail with a bad request when the client sends no JSON body.
The TUI full-session fork path calls
session.fork({ sessionID }). The generated SDK strips the empty body when there is nomessageID, but the HTTP API currently tries to parse the missing request body as JSON for/session/:sessionID/fork.This produces a server-side request parse error:
In the TUI this can surface as a crash when the caller assumes
forked.data.idexists after the failed request.Expected behavior
POST /session/:sessionID/forkshould accept an empty/no-content request body as a full-session fork, while still accepting{ "messageID": "..." }for message-specific forks.Notes
This appears to affect the full-session fork path added by #23339.