Reset tip edge cases
Browse files
src/deepagents_rl/train/swe_env.py
CHANGED
|
@@ -422,11 +422,13 @@ class DeepAgentSWEEnv:
|
|
| 422 |
)
|
| 423 |
# TRL appends this string to the last user message — force tool use.
|
| 424 |
return (
|
| 425 |
-
"\n\nCRITICAL
|
| 426 |
-
"
|
| 427 |
-
"
|
| 428 |
-
"
|
| 429 |
-
"
|
|
|
|
|
|
|
| 430 |
)
|
| 431 |
|
| 432 |
def _cleanup(self) -> None:
|
|
|
|
| 422 |
)
|
| 423 |
# TRL appends this string to the last user message — force tool use.
|
| 424 |
return (
|
| 425 |
+
"\n\nCRITICAL REMINDER (edge cases):\n"
|
| 426 |
+
"- Use structured tool/function calls only (not markdown ```json``` blobs).\n"
|
| 427 |
+
"- FIRST tool call MUST be ls with path='.' (repo root). Never ls 'src'/'lib'/'app'.\n"
|
| 428 |
+
"- Only read_file/edit_file paths that appeared in ls/glob output.\n"
|
| 429 |
+
"- Prefer edit_file with unique old_string; keep the diff minimal.\n"
|
| 430 |
+
"- If a path is missing, ls '.' again and pivot — do not retry the same missing path.\n"
|
| 431 |
+
"- When done editing, stop tools and reply: DONE <summary>."
|
| 432 |
)
|
| 433 |
|
| 434 |
def _cleanup(self) -> None:
|