Repository navigation
fix(server): releasing one Devin session no longer ends the others on Linux - #38333
juliusmarminge wants to merge 1 commit into
Conversation
… Linux Devin's daemon mode starts one shared daemon inside the systemd scope of whichever session launched it, so stopping that session's scope killed every other Devin session. Launch Devin with --process-model in-process. Fixes #38327 Co-Authored-By: Claude Opus 5.5 <[email protected]>
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — Devin registry launches now use in-process execution so releasing one session does not terminate others. This unconditionally changes the default process model across platforms and requires confirmation of the intended lifecycle behavior. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
The automated pipeline stopped on this pull request and will not merge it: the fix is written and reviewed, but proving it needs something no worker has:
It stays open for a person to finish or close. |
On Linux each ACP session runs in its own systemd scope, and T3 stops that scope when it releases the session. Devin's daemon mode (the registry launch is a plain
devin acp, and daemon mode can come from Devin's config) starts onedevin daemon run --for-clientthat every session shares, as a child of whicheverdevin acpstarted first, so inside that session's scope. Stopping that scope killed the daemon and every other Devin session that relayed through it. The fix: AcpRegistryCatalog.resolve appends--process-model in-processto Devin's launch args, so each session runs its own agent in its own process and no daemon starts. Doing it in resolve covers session runtimes, probes and the terminal-login spawn (devin acp --process-model in-process --login, which Devin's CLI parses), and it also applies when the user sets a custom command path. Reproduced on Devin 3000.13.4 (the registry's linux-x86_64 binary) with an isolated HOME: with--process-model daemonthe daemon was a child of the first launcher; with--process-model in-processno daemon ran and initialize and session/new still worked, including when config.json set process_model to daemon. Not verified: a full run through a T3 server with a prompt in progress, because prompts need a signed-in Devin account. No new regex or parser.Fixes #38327
Reproduction on main
Commit origin/main b387e3a (T3 cleanup code identical in substance to the reporter's 0c676d9). Downloaded the ACP Registry's Devin binary (3000.13.4, linux-x86_64) into a scratch dir and drove it with a Python script over ACP stdio, with an isolated HOME/XDG data directory. 1) Started client A with
systemd-run --user --scope --unit=<A>.scope devin acp --process-model daemon, ran initialize and session/new (works without a Devin login), then did the same for client B in its own scope .scope. 2) The process list showeddevin daemon run --for-clientliving in A's scope, with B'sdevin acpin B's scope relaying to it. 3)systemctl --user stop <A>.scope(what T3's AgentScope.stop does when a session is released). Result: the shared daemon died, and B's stdout hit EOF and B's launcher exited about 1s later, although only A's scope was stopped. Control: with no daemon (the default for this unauthenticated CLI, or--process-model in-process), stopping A's scope left B running and B's next session/new succeeded. Writing"process_model": "daemon"into Devin's config.json also makes a plaindevin acp(the registry's launch args) start the shared daemon. Not done: an end-to-end run through a T3 server with an in-flight prompt in B, because prompts need a signed-in Devin (Cognition) account, which no VM has. The reporter'sstopReason: cancelledon B's prompt is therefore taken from the report; the daemon dying with A's scope and taking B down was seen directly.Evidence
Being captured: before and after in the real app. This section is filled in before the pull request can merge.
Tests
vp test run src/server/AcpRegistrySupport.test.ts in packages/provider-acp-registry: 42/42 pass; the new 'launches Devin without its shared daemon' test fails with the source change stashed (expected ['acp'] to equal ['acp','--process-model','in-process']). vp run check:changed: format, lint, knip, typecheck (10 packages), tests (2 files, 44 tests) all pass.
Not in this change
Who did the work
Run by the t3code factory in T3 Code.