Agent Wealth HubFree public resources
中文 EN العربية

Back to catalog / Agent workflows

Fix a failing test fixture and verify independently

Iterate on failing tests in a locked-down fixture, then rerun assertions outside the agent session.

Goal

Have an agent fix known defects and confirm the final files pass the original tests without over-editing.

Steps

  1. Upload source and test files separately and create an environment with networking: {"type":"limited"}; mounted uploads are read-only. [iterate]
  2. Use agent_toolset_20260401 for the test/read-traceback/edit/rerun loop; fix the failing assertion instead of weakening tests. [iterate]
  3. After the run, execute the full suite outside the session and inspect the final diff; the example independently reruns pytest. [iterate]

How to verify

External tests pass, the diff is limited to the defect, and the read-only mounted originals remain unchanged.

Troubleshooting

If the same failure repeats, confirm the agent copied read-only mounts to a writable directory; `session idle` is not a passing test.

Permissions

Prerequisites

Permissions

Limitations

Agent-run tests are not independent verification; trusted CI must rerun them before merge or release.

Pinned upstream source

https://github.com/anthropics/anthropic-cookbook/blob/9c1e493ddd2b82df399d2a61b9c806c539e18be6/managed_agents/CMA_iterate_fix_failing_tests.ipynb

Repository
anthropics/anthropic-cookbook
File path
managed_agents/CMA_iterate_fix_failing_tests.ipynb
Pinned commit
9c1e493ddd2b82df399d2a61b9c806c539e18be6
Source checked
2026-10-14 · Reviewed against the pinned upstream source

Repository metrics

These values describe the upstream repository, not popularity or likes for an individual skill or playbook.

Stars
Not collected
Forks
Not collected
Observed at
Not collected

No metrics snapshot is available yet.

License: MIT

Main topic

Take a coding Agent change from context to verification

Related resources