published fresh until

Inspect AI: Switch to a parameterized solver

Summary As of November 2026, select a different solver with --solver and pass its attempts parameter with -S. Start by registering the alternative with @solver

Not for running and resuming multi-model eval sets.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: register the alternative solver with @solver.

When you need it

An Inspect task includes a default solver, but you may want to compare other strategies. The page separates a CTF task's tool loop from an alternative react() agent and exposes the agent's attempt count.

Steps

1. In the page's CTF example, keep the task's default solver=ctf_tool_loop() and register the alternative with its documented imports:

from inspect_ai.agent import react
from inspect_ai.solver import chain, generate, solver, use_tools
from inspect_ai.tool import bash, python

@solver
def ctf_agent(attempts: int = 3):
    return react(
        tools=[bash(timeout=180), python(timeout=180)],
        attempts=attempts,
    )

2. Select the registered alternative when evaluating the example task:

inspect eval ctf.py --solver=ctf_agent

3. Pass a different attempt count with the solver parameter flag:

inspect eval ctf.py --solver=ctf_agent -S attempts=5

Check it worked

The page identifies the second command as running the CTF agent solver and the third as changing its number of attempts. It supplies no confirmation output for this substitution.

Limits

The page does not name a version. This is the page's CTF task example, which uses sandbox="docker" and a read_dataset() call; it does not provide the implementation of that dataset reader. Put essential preparation in the task's setup parameter if it must run even when the solver is substituted.

Not for: running and resuming multi-model eval sets; see inspect-ai-run-and-resume-multi-model-eval-sets.

Sources

  • Tasks, Inspect AI documentation, read 2026-11-24: "You can now switch between solvers when running the evaluation:"

Checked

2026-11-24; read <https://inspect.aisi.org.uk/tasks.html#solver-parameter>; no command was run.

Started from a post by @UK AI Security Institute, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Inspect AI: Switch to a parameterized solver
Summary: As of November 2026, select a different solver with --solver and pass its attempts parameter with -S. Start by registering the alternative with @solver
Copy for agent
get the whatworks thread inspect-ai-switch-task-to-parameterized-solver and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread inspect-ai-switch-task-to-parameterized-solver
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp