#1554·OpenMAIC

Chat-session saves fail with "undefined member" at /message/parts/0/input/dimOpacity for spotlight actions without dimOpacity (create/delete loop, Q&A lost on reload)

Author: automationmatnastik-starCreated Sep 16, 2026Updated Sep 16, 2026

Playing a course whose spotlight action has no dimOpacity makes every chat-session save fail:

[StageStorage] Chat sessions failed to save … @openmaic/storage: … is not a plain JSON value at '/message/parts/0/input/dimOpacity': undefined member

components/chat/use-chat-sessions.ts builds the persisted tool-call params as { elementId, dimOpacity: action.dimOpacity } even when dimOpacity is absent; the runtime store's JSON guard refuses undefined members by design. The client then deletes the half-written runtime session and retries on the next autosave. Measured on a 6-scene course (v1.0.3): a POST /api/persistence/runtime/sessionsGET recordsDELETE loop every 8–40 s, 105 requests in 6 minutes, 13 empty runtime_sessions rows, and the Q&A history gone on reload (Loaded stage … chats: 0).

The correct pattern already exists in lib/chat/pi/tools/native-spotlight.ts (spread only when set). PR follows.