Bump inspect_ai to >=0.3.249 (Anthropic bridge system-role fix)#30
Merged
Conversation
The sandboxed claude_code agent (inspect_swe) proxies its Anthropic API calls back through inspect's model bridge via `generate_anthropic`. inspect_ai 0.3.220's `messages_from_anthropic_input` (agent/_bridge/anthropic_api_impl.py) only handled `user`/`assistant` message roles and raised `RuntimeError: Unexpected message role: system` on anything else. Current Claude Code emits a system-role entry in `messages[]`, so every arm was interrupted mid-sample before any sample completed. inspect_ai 0.3.249 adds an explicit `elif param["role"] == "system"` branch that folds the content into a `ChatMessageSystem` (anthropic_api_impl.py:454-456), fixing the crash. Bump the floor and the astabench override to >=0.3.249 and regenerate the frozen lock (uv run --frozen is used downstream, so pyproject alone would not take effect). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
@jbragg https://github.com/allenai/gas2own/issues/346 uncovered this one, but i'm gonna need your review to see if this is legit |
jbragg
approved these changes
Jul 23, 2026
jbragg
left a comment
Collaborator
There was a problem hiding this comment.
I didn't investigate the truth of the claim but bumping seems fine to me
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.
What
Bump the
inspect_aifloor (and the astabench override) insolvers/inspect-swe/pyproject.tomlfrom>=0.3.220to>=0.3.249, and regenerate the frozenuv.lock(inspect-ai0.3.220 → 0.3.249,inspect-swe0.2.54 → 0.2.66).Why
The sandboxed
claude_codeagent proxies its Anthropic API calls back through inspect's model bridge (generate_anthropic). In inspect_ai 0.3.220,messages_from_anthropic_input(src/inspect_ai/agent/_bridge/anthropic_api_impl.py) only handleduser/assistantroles and raised on anything else:Current Claude Code emits a
system-role entry insidemessages[], so every arm was interrupted mid-sample before any sample completed — no.reductions, no scores. inspect_ai 0.3.249 adds an explicitelif param["role"] == "system"branch that folds the content into aChatMessageSystem(anthropic_api_impl.py:454-456), which resolves the crash.uv run --frozenis used downstream (gas2own's asta-eval jobrunner), so bumpingpyproject.tomlalone would not take effect — the lock is regenerated in this PR.Context
Surfaced by the gas2own asta
improve-skillseval runner (allenai/gas2own#346); the runner now fails loudly quoting the arm's own error, which is how this upstream cause was pinned.🤖 Generated with Claude Code