Skip to content

fix: coerce stringified tool-call lists in StoryElements - #14

Merged
phaethix merged 2 commits into
mainfrom
fix/coerce-stringified-tool-lists
Jul 24, 2026
Merged

fix: coerce stringified tool-call lists in StoryElements#14
phaethix merged 2 commits into
mainfrom
fix/coerce-stringified-tool-lists

Conversation

@phaethix

Copy link
Copy Markdown
Owner

Summary

  • Fixes #13: Agnes sometimes returns nested tool-call fields (characters, settings, panels, …) as JSON strings instead of arrays
  • Add coerce_jsonish / coerce_list + Pydantic before validators on tool-facing schemas

Test plan

  • .venv/bin/pytest -q
  • Resume generate for project that hit this error; extract stage should continue

Made with Cursor

phaethix and others added 2 commits July 24, 2026 11:02
Agnes sometimes returns nested arrays as JSON strings inside tool
arguments; accept them so extract/storyboard validation does not abort.
Fixes #13

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@phaethix
phaethix merged commit 2327e6e into main Jul 24, 2026
3 checks passed
@phaethix
phaethix deleted the fix/coerce-stringified-tool-lists branch July 24, 2026 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StoryElements validation fails when model stringifies characters list

1 participant