Skip to content

Comments

Make local RLM REPL concurrency configurable#777

Merged
snimu merged 2 commits intomainfrom
sebastian/rlm-threading-2026-01-24
Jan 24, 2026
Merged

Make local RLM REPL concurrency configurable#777
snimu merged 2 commits intomainfrom
sebastian/rlm-threading-2026-01-24

Conversation

@snimu
Copy link
Contributor

@snimu snimu commented Jan 24, 2026

Description

Make local RLM REPL concurrency configurable, set high default.

Type of Change

  • 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

Note

Introduces configurable local REPL concurrency and wires it into the local executor.

  • Adds local_repl_max_workers param to RLMEnv.__init__ and documents it
  • Sets default to clamp(os.cpu_count(), 1..64) and validates >= 1
  • LocalRLMExecutor now constructs ThreadPoolExecutor(max_workers=self.env.local_repl_max_workers)
  • No functional changes to sandbox path; only local backend behavior is affected

Written by Cursor Bugbot for commit ebbcf3d. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

sandbox_client_max_workers: int = 10,
sandbox_client_max_connections: int = 100,
sandbox_client_max_keepalive_connections: int = 50,
local_repl_max_workers: int | None = None,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing documentation for new configuration parameter

Low Severity · Bugbot Rules

The PR adds a new user-facing parameter local_repl_max_workers to RLMEnv, but the documentation in docs/environments.md is not updated to reflect this. The existing RLMEnv documentation at line 775 describes various configuration options but doesn't mention this new concurrency setting. Per the project's review rules, documentation updates are required when adding user-facing functionality to classes described in docs/.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs for the rlm will have to be properly updated in another PR; right now, it changes so quickly that this doesn't make sense (and a bunch of other args are un-documented as well). Will do this later.

@snimu snimu merged commit 03e74bd into main Jan 24, 2026
6 checks passed
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