diff --git a/extensions/remote-control/server/routes/sessions.ts b/extensions/remote-control/server/routes/sessions.ts index c1b5799..6f755ac 100644 --- a/extensions/remote-control/server/routes/sessions.ts +++ b/extensions/remote-control/server/routes/sessions.ts @@ -1,7 +1,7 @@ /** * S-09 — multi-session CRUD routes. * - * POST /sessions → { id, name } + * POST /sessions → { id, name, state, lastOutputAt } * GET /sessions → [{ id, name, description, state, lastOutputAt }] * PATCH /sessions/:id → updates @description * DELETE /sessions/:id → kills tmux session, optionally clears buffer @@ -110,7 +110,9 @@ async function handleCreate( try { const id = await spawnSession({ name }); - sendJson(res, 201, { id, name }); + // Include state + lastOutputAt to match the GET /sessions response shape + // so iOS clients can decode the response with the same type. + sendJson(res, 201, { id, name, state: "idle", lastOutputAt: "" }); } catch (err) { sendJson(res, 500, { error: "internal_error", message: String(err) }); }