SWE-ReX is a runtime interface for sandboxed shell environments. An agent's code stays the same whether its commands run locally, in Docker containers, on AWS remote machines, on Modal, or somewhere else, which keeps agent logic separate from the infrastructure underneath it.
It manages live shell sessions rather than one-shot commands: it detects when a command has finished, extracts the output and exit code, and returns both to the agent. An agent can drive interactive command-line programs such as ipython or gdb, and hold several shell sessions open at the same time, the way a person keeps a shell, a REPL, and a debugger side by side.
The project came out of work on SWE-agent and SWE-agent enigma, where it supports parallel agent runs across large benchmark suites — for example, SWE-agent working through 30 SWE-bench instances at once — and platforms including non-Linux machines without Docker.
Features
- Shell session control: commands run in persistent sessions with completion detection, captured output, and exit codes
- Interactive tools: agents use ipython, gdb, and similar programs inside a session
- Parallel sessions: several shells per agent, and many agents running at the same time
- Execution backends: local, Docker, AWS Fargate, and Modal, with Daytona support in progress
- Platform reach: covers non-Linux machines that have no Docker available
- Separation of concerns: the same agent code runs against any backend, so infrastructure changes do not touch agent logic