Skip to content

fix(acp-registry): a local devin command gets Devin's handling - #40984

Open
juliusmarminge wants to merge 2 commits into
mainfrom
factory/issue-40979
Open

juliusmarminge wants to merge 2 commits into
mainfrom
factory/issue-40979

Conversation

@juliusmarminge

Copy link
Copy Markdown
Member

A Devin CLI added as a local ACP command (a path to the devin binary) got plain ACP handling instead of Devin's. When the user accepted its plan, T3 picked 'implement plan and bypass permissions'. Shell commands also ran inside Devin's own process and not in a T3 terminal, and no subagent cards appeared. isDevin in the ACP Registry adapter now also recognises a local command named devin (.exe/.cmd on Windows), as the adapter already does for other agents. Local Devin now gets the same terminals, subagent grouping and plan approvals as a registry install.

Fixes #40979

Reproduction on main

origin/main @ bc13afa. No Devin binary or account exists on the VM, so I drove the real ACP Registry adapter (makeAcpRegistryAdapterV2 through AcpRegistryAdapterV2) with Devin's recorded plan-exit permission frames. The same test ran twice: once with settings agentId "devin" (registry) and once with { source: "local", commandPath: "/opt/devin/bin/devin" }. Devin lists plan_bypass first and plan_accept_edits second, both allow_once. The user accepts the plan. Registry: the test passes and answers optionId plan_accept_edits. Local: the test fails and answers optionId plan_bypass (expected plan_accept_edits). So a local devin binary has its plan approval answered with 'implement plan and bypass permissions'. Command: vp test run src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts -t "Devin's plan" from apps/server. Result: 1 failed (local), 1 passed (registry). The code shows the same isDevin gate controls clientTerminals, clientCapabilitiesMeta, normalizeDevinSessionUpdate/ToolCall and extractDevinSubagentUpdate. None of those were exercised against a real devin binary.

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/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts -t "Devin's plan" (apps/server) without the fix: 1 failed (local), 1 passed (registry)
  • vp test run src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts (apps/server) with the fix: 55 passed
  • vp run check:changed: format, lint, knip, graphql, typecheck (10 packages), tests (2 files, 57 passed) all pass

Not in this change

  • Each local-command check in the adapter repeats options.settings.commandPath.split(/[\\/]/).pop(); it could be one shared basename helper, but that is a refactor.

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.

juliusmarminge and others added 2 commits November 22, 2026 18:35
…ut bypass

Fails on main: isDevin only matches the registry agentId, so a local
devin binary selects plan_bypass when the user accepts the plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
isDevin only matched the registry agentId, which is empty for local
commands, so a local devin binary got no client terminals, no Devin
normalizers and no answerable-permission filter, and accepting its plan
picked plan_bypass. Match the command basename like the other agents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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 22, 2026
@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: bc13afa · PR result: 582bb9f · 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 22, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The ACP registry adapter now recognizes local commands named devin, devin.exe, or devin.cmd, regardless of case. The plan-approval test covers both local and registry Devin configurations.

Changes: Local Devin handling

Layer / File(s) Summary
Devin detection and plan-approval validation
packages/provider-acp-registry/src/server/adapter.ts, apps/server/src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts
The adapter identifies local Devin commands by basename. The parameterized test verifies that accepting the runtime request selects plan_accept_edits and completes the turn for local and registry configurations.

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

Change: Bug fix · Severity of issue fixed: Medium

Possibly related PRs

Suggested reviewers: ndycode, t3dotgg, macroscopeapp

Merge Risk: Minimal · up to 582bb

Local Devin commands now get the same Devin-specific handling as registry installs, including plan approval that selects the accept-edits option. The change is small and covered by a test for both configurations. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a local devin command now receives Devin-specific handling in the ACP Registry adapter. It follows the conventional commit format and matches the raw summary and obj…
Description check Passed The description follows the template sections: Problem, Change, Scope, Verification, and agent attribution. It explains the bug, the fix, and the linked issue #40979. It gives reproduction steps and t…
Linked Issues check Passed Issue #40979 asks that a local ACP command whose basename is devin, devin.exe, or devin.cmd receive the same Devin handling as registry agentId "devin". The diff in packages/provider-acp-registry/src/…
Out of Scope Changes check Passed The source change is limited to the isDevin expression in adapter.ts. The test file change extends the existing Devin plan-approval test to the local source. Both changes directly implement #40979. Th…
Full details: Title check

Explanation

The title names the main change: a local devin command now receives Devin-specific handling in the ACP Registry adapter. It follows the conventional commit format and matches the raw summary and objectives. It is specific enough for a teammate scanning history.

Full details: Description check

Explanation

The description follows the template sections: Problem, Change, Scope, Verification, and agent attribution. It explains the bug, the fix, and the linked issue #40979. It gives reproduction steps and test results. The Evidence section says before/after capture is still in progress and must be filled before merge. The description also states that real-binary behavior was not exercised. The Scope section links the issue, but it does not explain why the fix is a bug fix rather than a feature, though the linked issue describes a bug. The Problem section is clear. Overall the description is mostly complete.

Full details: Linked Issues check

Explanation

Issue #40979 asks that a local ACP command whose basename is devin, devin.exe, or devin.cmd receive the same Devin handling as registry agentId "devin". The diff in packages/provider-acp-registry/src/server/adapter.ts changes isDevin to match registry agentId "devin" or, when source is "local", the regex /^devin(.exe|.cmd)?$/i against the commandPath basename. This matches the pattern used by the neighboring isAntigravityCli check and the requested behavior. The issue lists clientTerminals, clientCapabilitiesMeta, the Devin session update and tool call normalizers, extractDevinSubagentUpdate, and devinAnswerablePermissionOptions as gated by isDevin. The diff changes only the isDevin value, so these gates now apply to local Devin. I did not re-read each gate at head. The test file adds a local-source case for the Devin plan-approval test, which checks that plan_accept_edits is selected. That test uses recorded permission frames, not a real Devin binary. Real-binary behavior is unverified, and the PR evidence section is still pending. Coding requirements are met in the code and in the recorded-frame test.

Full details: Out of Scope Changes check

Explanation

The source change is limited to the isDevin expression in adapter.ts. The test file change extends the existing Devin plan-approval test to the local source. Both changes directly implement #40979. The PR excludes a basename helper refactor, and the diff does not include one. No unrelated changes were found 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 bc13afa and 582bb9f.

Files selected for processing: 2

  • apps/server/src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts
  • packages/provider-acp-registry/src/server/adapter.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 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: the native Devin CLI and account are required to reproduce local Devin plan approval, managed terminals, subagent cards, and message grouping in the real app; the brief explicitly lists native Devin as unavailable on every VM. Neither base failure nor head success was observed.

It stays open for a person to finish or close.

@BeforeLights

Copy link
Copy Markdown

This was tested and is working on my local

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]: Local ACP command Devin gets none of the Devin-specific handling (isDevin only matches registry agentId)

2 participants