Two agent-loop bugs found in the Sep 24 loop evaluation, folded into the
1.5.7 line:
1. A linked-session turn whose user message carried an image/video/document
attachment crashed 100% of the time: derive_llm_history projects multimodal
content as an OpenAI parts list, and orchestrate() read that list as the
goal and called .strip() on it (AttributeError: 'list' object has no
attribute 'strip'). New log.text_of_content() extracts the text part; the
goal read uses it, so single-loop and swarm paths both survive attachments.
2. When ask_user paused the turn mid tool-batch, the remaining calls of that
step never executed but also never received tool results, leaving an
assistant tool_calls message with dangling ids - an invalid request
sequence that strict OpenAI-compatible servers 400 on the next turn. The
pause path now synthesizes skipped tool/call + tool/result events and
tool-role messages for the un-executed ids before ending the turn.
The new multimodal-goal tests now stub the planner LLM: the attachment
appendix puts newlines in the extracted goal, so the message is never
trivial-path and the unstubbed planner made a real network call - the source
of the tests' flakiness (and the swarm-path test now attaches the document
it always claimed to).
Backend suite: 538 passed.
Build Scene (/build-scene): three.js + mannequin-js blockout viewport ported
from open-media, with per-session compositions (origin='scene' keeps rails
separate), agent shot_* tools as the only toolset for that surface, viewport
toolbar, keyframe motion + camera timeline with 60s video export, and
captures usable as project reference images.
Scene to Clips: clips table (1 scene : N renderable shots), coverage agent
breaks scenes into shots with full dialogue/action allocation, script
generation stays faithful to the screenplay (verbatim dialogue, content-
derived durations, chunked + durable inserts), video pipeline re-scoped to
clips (enqueue, continue-from, export, drafts), Script/Video UI clip-first
(#N.M labels, per-scene Break Into Shots scoped to one scene).
Agent loop: lean ReAct discipline with fail-streak escalation and budget
nudge; policy treats explicit user commands as permission; Build Scene tool
scope enforced mechanically; document + video attachments feed the VLM.
Some exceptions stringify EMPTY (httpx.ReadTimeout/ReadError, TimeoutError):
a sub-agent killed mid-stream by a backend restart reported 'Sub-agent
failed: ' with nothing after the colon, and no traceback was logged anywhere
(observed live 2026-08-25). The handler now logger.exception()s and formats
'Type: message' (or bare 'Type' when the message is empty).
(cherry picked from commit ff138a9a01a93714dc6d8d2bce3ee57ace03647d)
Once a session linked to a project, the agent could neither create a fresh
project (create_project is sandbox-only) nor switch (link_project is
sandbox-only) — and no unlink existed. Observed live: a linked agent burned
three failed tool calls and ~7 minutes of reasoning discovering the box, then
overwrote the linked project as its only option.
unlink_project (linked-only) clears the session binding and nothing else; the
blind_only rejection message now points to it, so the model recovers in one
step; link_project's description documents the switch path.
(cherry picked from commit f4fc7cde6461529177563d58383c5c50287026e1)