Skip to content

fix(devin): tell edit delegates that confirmation-needing commands end the run - #38

Open
danikdanik wants to merge 1 commit into
alexgreensh:mainfrom
danikdanik:fix/devin-edit-confirmation-note
Open

danikdanik wants to merge 1 commit into
alexgreensh:mainfrom
danikdanik:fix/devin-edit-confirmation-note

Conversation

@danikdanik

@danikdanik danikdanik commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Hey Alex, a small companion to #37.

What

On the devin lane, the edit verb (accept-edits) now adds a short note to the prompt: commands that need confirmation end the run, so make all file edits first, don't run tests or builds, and end with the verification commands to run. OSRC_DEVIN_EDIT_NOTE=0 turns it off. run/explore (auto) prompts are unchanged.

Why

On 0.13.4 a bg edit -m swe-2 job made its edits correctly, then tried to run the tests and got:

Now running verification from `apps/web`.warning: rejected a tool call that requires confirmation. Running in non-interactive mode. Use --permission-mode dangerous to auto-approve all tools.

Devin ends the session there. In -p mode, accept-edits auto-approves edits and simple read-only commands (cat, python3 -c both ran fine for me), but anything it wants confirmed is refused. Test runners, package managers, deletes and cd ... && chains are the usual ones. The delegate doesn't know this in advance, so its last step, verification, is exactly the one that gets cut. jobs-and-safety.md already tells the orchestrator to "restructure the prompt so the delegate ENDS on a file write"; this tells the delegate the same thing.

How

About ten lines in delegate(): when perm is accept-edits and OSRC_DEVIN_EDIT_NOTE isn't 0, the note goes after the task. It adds one sentence to jobs-and-safety.md, which also points to session for when the delegate itself must run tests.

How to reproduce

mkdir -p /tmp/p/sub && cd /tmp/p
devin --model swe-2-high --permission-mode accept-edits --respect-workspace-trust false \
  -p "Run exactly this single shell command and report its output: cd sub && rm -f nothing.txt && npm --version"

The run ends on the reject warning without doing the step. On a real edit task, the edits land and the test run is what gets refused.

Tests

  • New test_devin_edit_note.sh (7/7, registered in conformance.sh). A fake devin records the -p prompt. The tests check that the edit prompt keeps the task and gets the note, that the auto prompt doesn't get it, that the opt-out works, and that the edit verb still routes through accept-edits.
  • Full conformance.sh: the only failures are the ones main already has on my machine (test_autodetach, test_cline_lane, test_devin_plan_quota, test_lane_plan_limit, test_failover_pick).

If you'd rather not change delegate prompts at all, I'm fine closing this and keeping it as a doc note only.

…d the run

In accept-edits, devin -p refuses any exec it wants confirmed and ends the
session, which usually lands on the delegate's own test/build step. Add a
note to the edit prompt: edits first, no test/build commands, end with the
verification commands. OSRC_DEVIN_EDIT_NOTE=0 turns it off.
@danikdanik danikdanik changed the title fix(devin): tell edit delegates that confirmation-needing commands end the run fix: tell edit delegates that confirmation-needing commands end the run Sep 23, 2026
@danikdanik danikdanik changed the title fix: tell edit delegates that confirmation-needing commands end the run fix (devin): tell edit delegates that confirmation-needing commands end the run Sep 23, 2026
@danikdanik danikdanik changed the title fix (devin): tell edit delegates that confirmation-needing commands end the run fix(devin): tell edit delegates that confirmation-needing commands end the run Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant