fix(studio): deep-dive fixes — tool-error bodies, public reasoning, handler 500s, event log costs - #5
Merged
Merged
Conversation
…reasoning out, the handler answers defects, the event log and stream stop re-reading the file
- reports.tool_error reads {"error": ...} bodies the simulator returns with status completed; the story no longer claims every call succeeded
- narrative.without_reasoning keeps the provider's summaries out of public reports
- Handler.unexpected answers a 500 with the exception's name; the scheduler logs what it survives
- Studio.emit caches the event count; Studio.events_from tails the log by byte offset for the stream
- api_loop follows the Studio rule: no text or an abnormal stop is not a finished answer
- run_story handles repetitions; one-pass trace indexes; usage.py, config.py, agents.py and unused-import cleanups
- browser suite: story-first attempt sheet, the new report section, and the fixture server's process tree killed on Windows
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
{"error": {...}}with status completed) now count as tool errors in attempt reports and stories; the story no longer claims every call succeeded.Studio.emitcaches the event count instead of re-counting the file per event; the SSE stream tails the log by byte offset.run_storyhandles repetitions; two O(n²) trace scans are one-pass; duplicatewhoinusage.py, shadowedfield, late-binding lambda and unused imports removed.Test plan
uv run python -m pytest tests -q— 2128 passed, 3 skippednode tests/browser/suite.cjs— all checks pass, no stale listener left🤖 Generated with Claude Code