Skip to content

fix: pin RLM_HOME outside agent workdir to survive destructive ops#1269

Open
snimu wants to merge 1 commit intomainfrom
sebastian/rlm-fix-paths-2026-04-30
Open

fix: pin RLM_HOME outside agent workdir to survive destructive ops#1269
snimu wants to merge 1 commit intomainfrom
sebastian/rlm-fix-paths-2026-04-30

Conversation

@snimu
Copy link
Copy Markdown
Contributor

@snimu snimu commented Apr 30, 2026

Description

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Test improvement

Testing

  • All existing tests pass when running uv run pytest locally.
  • New tests have been added to cover the changes

Checklist

  • My code follows the style guidelines of this project as outlined in AGENTS.md
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Additional Notes


Note

Medium Risk
Changes where rlm writes/reads session state by forcing RLM_HOME (and the metrics glob) to /tmp/.rlm, which could affect environments relying on the previous workdir-relative location.

Overview
Pins rlm session state outside the agent workdir by setting RLM_HOME to /tmp/.rlm in rlm_harness, preventing agent cleanup commands from deleting rlm’s session directory mid-rollout.

Aligns post-rollout metrics collection with this new location by updating the harness metrics_path (and related tests) to read meta.json from /tmp/.rlm/sessions/* instead of {workdir}/.rlm/....

Reviewed by Cursor Bugbot for commit 6372ed6. Bugbot is set up for automated code reviews on this repo. Configure here.

The harness defaulted RLM_HOME to .rlm (relative), so with CWD=/testbed
session state landed in /testbed/.rlm/. Agent ops that wipe the workdir
(git clean -fdx, rm -rf, git stash) then deleted the session dir
mid-rollout, breaking the next meta.json write — observed on ~3% of
SWE-bench rollouts. Pin to /tmp/.rlm and align metrics_path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@snimu snimu requested review from mikasenghaas and rasdani April 30, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant