vanishingradient commited on
Commit
5e41a53
·
verified ·
1 Parent(s): e1bfc06

Reset tip edge cases

Browse files
Files changed (1) hide show
  1. src/deepagents_rl/train/swe_env.py +7 -5
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: Use structured tool/function calls only. "
426
- "Your first action MUST be: ls with path='.' (repo root). "
427
- "Do NOT call ls on 'src' — that folder often does not exist. "
428
- "Then read_file/grep using paths from that listing, then edit_file/write_file. "
429
- "Do not answer with a text-only plan. When the fix is applied, stop tools and say DONE."
 
 
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: