Skip to content

fix(server): releasing one Devin session no longer ends the others on Linux - #38333

Open
juliusmarminge wants to merge 1 commit into
mainfrom
factory/issue-38327
Open

juliusmarminge wants to merge 1 commit into
mainfrom
factory/issue-38327

Conversation

@juliusmarminge

Copy link
Copy Markdown
Member

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 one devin daemon run --for-client that every session shares, as a child of whichever devin acp started 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-process to 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 daemon the daemon was a child of the first launcher; with --process-model in-process no 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 showed devin daemon run --for-client living in A's scope, with B's devin acp in 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 plain devin 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's stopReason: cancelled on 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

  • AgentScope.stop still stops a session's whole scope. Any other provider whose CLI starts a shared background daemon inside the first session's scope would hit the same problem; this fix covers only Devin.
  • A user-supplied Devin command path that points at an older Devin build without --process-model would now fail to start; the registry-managed binary (3000.13.4) supports the flag.

Who did the work

  • Written by Claude Opus 5.5, in Claude Code
  • Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
  • Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5

Run by the t3code factory in T3 Code.

… 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]>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 17, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.5 KiB 21.5 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Other scenarios

All 64 scenario measurements match main.

All 64 scenario measurements
Provider Scenario Metric Main baseline This PR Impact PR ceiling
Codex short turn resume WebSocket decoded 10.5 KiB 10.5 KiB 0 B (0.0%) 12.7 KiB ✅
Codex short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn running, cold open HTTP decoded 281.7 KiB 281.7 KiB 0 B (0.0%) 302.7 KiB ✅
Codex long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Codex long turn running, history page HTTP decoded 92.4 KiB 92.4 KiB 0 B (0.0%) 107.4 KiB ✅
Codex long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Codex long turn finished, cold open HTTP decoded 381.5 KiB 381.5 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, socket cold open WebSocket decoded 381.6 KiB 381.6 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, work page HTTP decoded 186.2 KiB 186.2 KiB 0 B (0.0%) 200.2 KiB ✅
Codex long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Codex idle thread resume WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell snapshot HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Codex fleet shell subscribe WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Codex fleet shell resume check rows 0 0 0 0 ✅
Codex stale shell reload HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex stale shell reload rows 27 27 0 (0.0%) 27 ✅
Codex stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Codex stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex stale todo list cold open HTTP decoded 72.4 KiB 72.4 KiB 0 B (0.0%) 83.0 KiB ✅
Codex stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Codex stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅
Claude short turn resume WebSocket decoded 10.6 KiB 10.6 KiB 0 B (0.0%) 12.7 KiB ✅
Claude short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn running, cold open HTTP decoded 283.3 KiB 283.3 KiB 0 B (0.0%) 302.7 KiB ✅
Claude long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Claude long turn running, history page HTTP decoded 93.4 KiB 93.4 KiB 0 B (0.0%) 107.4 KiB ✅
Claude long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Claude long turn finished, cold open HTTP decoded 384.2 KiB 384.2 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, socket cold open WebSocket decoded 384.3 KiB 384.3 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, work page HTTP decoded 188.1 KiB 188.1 KiB 0 B (0.0%) 200.2 KiB ✅
Claude long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Claude idle thread resume WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell snapshot HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Claude fleet shell subscribe WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Claude fleet shell resume check rows 0 0 0 0 ✅
Claude stale shell reload HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude stale shell reload rows 27 27 0 (0.0%) 27 ✅
Claude stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Claude stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude stale todo list cold open HTTP decoded 73.4 KiB 73.4 KiB 0 B (0.0%) 83.0 KiB ✅
Claude stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Claude stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅

Baseline: b387e3a · PR result: 4cc3d06 · Source CI: success

Scenario and decoded snapshot size

10 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.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Devin registry resolver now appends --process-model in-process to Devin’s launch arguments. A test verifies the resolved arguments. Other agents’ arguments remain unchanged.

Changes: Devin registry launch

Layer / File(s) Summary
Resolve Devin launch arguments
packages/provider-acp-registry/src/server/AcpRegistrySupport.ts, packages/provider-acp-registry/src/server/AcpRegistrySupport.test.ts
The resolver appends --process-model in-process for Devin. The test checks the resolved spawn arguments.

Estimated code review effort: 2 (Simple) | ~7 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: stienswout, maria-rcks, macroscopeapp

Merge Risk: Minimal · up to 4cc3d

This change launches Devin in in-process mode so that releasing one Devin session no longer interrupts another on Linux. It is a narrow, Devin-only change with a test covering the resolved arguments. Remaining caveats are that a full signed-in session run was not verified and that older Devin builds without the flag may fail to start.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the fix (releasing one Devin session no longer ends the others) and the scope (Linux, server). It matches the main change: adding --process-model in-process to Devin's launch args so s…
Description check Passed The description follows the template. It states the problem (Linux systemd scope teardown kills the shared Devin daemon and other sessions) with reproduction context. It explains the change (appending…
Linked Issues check Passed Issue #38327 requires that releasing one Devin ACP Registry session on Linux not interrupt other active sessions. The issue asks for this through the registry launch, without replacing the executable …
Out of Scope Changes check Passed The whole-PR change set is small. It adds a three-line conditional in AcpRegistryCatalog.resolve that applies only when agent.id === "devin". It also adds a test for the same spawn arguments. Both…
Full details: Title check

Explanation

The title names the fix (releasing one Devin session no longer ends the others) and the scope (Linux, server). It matches the main change: adding --process-model in-process to Devin's launch args so sessions do not share a daemon inside the first session's scope. It uses a conventional commit prefix and is a single sentence under 80 characters.

Full details: Description check

Explanation

The description follows the template. It states the problem (Linux systemd scope teardown kills the shared Devin daemon and other sessions) with reproduction context. It explains the change (appending --process-model in-process in AcpRegistryCatalog.resolve) and why it applies to all spawn paths. Scope is covered by the linked issue #38327. Verification lists focused tests, the new failing-without-fix test, the check run, and what was not verified end to end. The Evidence section is a placeholder that says it will be filled before merge, so the before/after proof is still missing. The model and harness attribution is present. The template asks for a conventional title and a bug-fix scope, and both are satisfied. The description is long, but it covers every required section.

Full details: Linked Issues check

Explanation

Issue #38327 requires that releasing one Devin ACP Registry session on Linux not interrupt other active sessions. The issue asks for this through the registry launch, without replacing the executable or changing global Devin settings.

The reviewed head adds if (agent.id === "devin") args = [...args, "--process-model", "in-process"]; in AcpRegistryCatalog.resolve (packages/provider-acp-registry/src/server/AcpRegistrySupport.ts). Each Devin session then runs its own agent process. No shared daemon starts inside the first session's systemd scope. The change applies to every Devin spawn that goes through resolve, which covers session runtimes, probes, and terminal login.

The PR reports controlled reproduction on Devin 3000.13.4. With --process-model daemon, stopping one scope killed the shared daemon and the other session's launcher. With --process-model in-process, the other session survived. The PR also reports that the flag takes effect when config.json sets daemon mode. I did not re-run these checks. The PR reports a unit test, 'launches Devin without its shared daemon', which I did not inspect.

Not established: an end-to-end T3 run with a prompt in progress. This needs a signed-in Devin account. The issue's core requirement is met at the spawn-argument level.

Full details: Out of Scope Changes check

Explanation

The whole-PR change set is small. It adds a three-line conditional in AcpRegistryCatalog.resolve that applies only when agent.id === "devin". It also adds a test for the same spawn arguments. Both changes implement the Devin-specific objective in #38327.

The PR does not change other providers, AgentScope.stop, or shared ACP runtime code. The PR and the linked issue both state that other providers are out of scope. No unrelated change is shown in the reviewed diff.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b387e3a and 4cc3d06.

Files selected for processing: 2

  • packages/provider-acp-registry/src/server/AcpRegistrySupport.test.ts
  • packages/provider-acp-registry/src/server/AcpRegistrySupport.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

@juliusmarminge

Copy link
Copy Markdown
Member Author

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:

  • Permanent blocker: A signed-in native Devin (Cognition) account is required to run concurrent Devin prompts through the real T3 app and observe session B finishing normally after session A is released. The brief explicitly states this provider/account is unavailable on every worker. Devin models through OpenCode or Pi and the replay provider do not exercise the affected ACP Registry launch path.
  • The unauthenticated daemon-lifecycle reproduction supplied by triage was not rerun; its observations are not claimed as evidence from this proof step.

It stays open for a person to finish or close.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Releasing one Devin ACP Registry session cancels other active sessions on Linux

1 participant