run_session() in the generated application:
Sandbox.create options
are available. See Modal’s general
resource configuration guide for request,
limit, and billing semantics.
Configure orchestration policy
The surrounding Modal function manages the session lifecycle. Use its decorator for placement policy when needed. Add Modal function retries only deliberately: each retry is a fresh claim attempt with a new acceptor identity.region places the lightweight
orchestration call itself, while the Sandbox’s region places where Devin
runs commands and edits files. Most deployments only need to set region on the
Sandbox. Set it on the function too only when you also want the orchestration call
co-located, for example alongside a database or internal service it depends on. When
constraining both, choose compatible regions and capacity available to your Modal
workspace.
Managed options
Pass only keyword options other thantimeout, workdir, or readiness_probe to
run_session(). modal-devin manages those values so it
can start, preserve, and clean up the session safely.
Use WorkerSettings to change supported lifecycle timing.
Keep the function timeout at least worker.session_function_timeout_seconds.
Scheduler policy
Edit the generated scheduler decorator to change its region or schedule. Keepmax_containers=1; it is required for safe dispatch with the current runtime.