Issue
The file tools/registry/lib/registry.py appears to be deleted in commit 402a7b8, causing the str_replace_editor tool to fail with: ModuleNotFoundError: No module named 'registry'
Impact
- Primary editing tool is broken - Every
str_replace_editor call fails immediately
- Massive retry overhead - Agents waste time retrying
- Degraded patch quality - Agents fall back to unreliable bash commands (
sed, echo)
- Wrong outputs - Some models create test files instead of fixing source code
While agents don't completely fail (they use bash fallbacks), editing quality is significantly degraded.
Sample Run
Total occurrences in this run: 1558
Model: gpt-5-mini
Instance: instance_ansible__ansible-0ea40e09d1b35bcb69ff4d9cecf3d0defa4b36e8-v30a923fb5c164d6cd18280c02422f75e611e8fb2
Sample Error From .traj:
"text": "OBSERVATION:\nTraceback (most recent call last):\r\n File \"/root/tools/edit_anthropic/bin/str_replace_editor\", line 18, in <module>\r\n from registry import registry as REGISTRY\r\nModuleNotFoundError: No module named 'registry'"
Root Cause
The registry module is a simple key-value store used by multiple tools:
- tools/edit_anthropic/bin/str_replace_editor (line 18)
- tools/diff_state/bin/_state_diff_state (line 9)
- tools/review_on_submit/bin/submit (line 10)
- tools/review_on_submit_m/bin/submit (line 10)
- tools/registry/bin/_read_env (line 5)
- tools/registry/bin/_write_env (line 5)
This file exists in upstream SWE-agent but was deleted during Scale's customizations. The commit message doesn't mention this
deletion, suggesting it was accidental.
Evidence
Upstream has the file:
$ git ls-tree -r 8089c8b tools/registry/lib/ -> 100644 blob registry.py
Scale fork deleted it:
$ git show 402a7b8 | grep registry.py -> tools/registry/lib/registry.py # Deleted in Scale's modifications
Fix
Restore the file from the parent commit:
git show 402a7b8^:tools/registry/lib/registry.py > tools/registry/lib/registry.py
Issue
The file
tools/registry/lib/registry.pyappears to be deleted in commit 402a7b8, causing thestr_replace_editortool to fail with: ModuleNotFoundError: No module named 'registry'Impact
str_replace_editorcall fails immediatelysed,echo)While agents don't completely fail (they use bash fallbacks), editing quality is significantly degraded.
Sample Run
Total occurrences in this run: 1558
Model: gpt-5-mini
Instance: instance_ansible__ansible-0ea40e09d1b35bcb69ff4d9cecf3d0defa4b36e8-v30a923fb5c164d6cd18280c02422f75e611e8fb2
Sample Error From .traj:
Root Cause
The
registrymodule is a simple key-value store used by multiple tools:This file exists in upstream SWE-agent but was deleted during Scale's customizations. The commit message doesn't mention this
deletion, suggesting it was accidental.
Evidence
Upstream has the file:
$ git ls-tree -r 8089c8b tools/registry/lib/-> 100644 blob registry.pyScale fork deleted it:
$ git show 402a7b8 | grep registry.py-> tools/registry/lib/registry.py # Deleted in Scale's modificationsFix
Restore the file from the parent commit:
git show 402a7b8^:tools/registry/lib/registry.py > tools/registry/lib/registry.py