Skip to content

[Bug]: Pi + devin-acp inner Devin PermissionRequest pins pane to Needs input after ACP approval #22011

Closed

Description

@mmarabel

Short summary:
Pi pane running @tian.zuo/pi-devin-acp sticks on "Needs input" after an inner Devin PermissionRequest that was already approved via ACP. Pi keeps showing Working... + devin: N running while Orca shows needs-input for the rest of the turn.

What happened?

  • Pi outer turn calls the devin wrapper tool and stays in-flight for minutes (screenshot: devin: 2 running — Ran pwd, ls — execute · exec · 4m33s · /devin-tasks to view).
  • Inner devin acp emits a Devin PermissionRequest for exec: ls -la /data/projects/appscraper ... (the same exec visible as Pi's devin Ran ls, echo card, so it did run).
  • ~/.config/orca/agent-hooks/last-status.json for .../clued/stock-images (pane b8dcbad7…:75564501…) is:
    source: "devin", hookEventName: "PermissionRequest", payload.state: "waiting", toolName: "exec", receivedAt ~9 min old (inside the 30 min freshness window).
  • normalizeDevinEvent (src/shared/agent-hook-listener/providers/devin-events.ts) maps PermissionRequest → waiting, and resolveWorktreeStatus (src/renderer/src/lib/worktree-status.ts) promotes that to permission / Needs input. No later Devin PreToolUse/PostToolUse → working overwrote it, and Pi emits no new Pi event while blocked inside the single devin wrapper tool call, so Orca stays waiting while Pi works.
  • No Pi select modal was open in the screenshot: pi-devin-acp (0.3.5) resolves ACP session/request_permission internally via ctx.ui.select or yolo auto-allow (lib/permission.ts). Orca only observes hooks, never the ACP resolution.

How can we reproduce it?

  1. In an Orca Pi pane, install @tian.zuo/[email protected] and select a devin/* model (e.g. devin/swe-2:max).
  2. Run a turn where Devin needs an exec approval (default mode accept-edits, yolo off). Approve it in Pi (or let yolo/bypass approve it) so Devin keeps running long ops.
  3. Observe: Pi shows Working... + devin: N running; Orca sidebar/worktree dot for that pane shows Needs input until the turn ends or the 30 min AGENT_STATUS_STALE_AFTER_MS (src/shared/agent-status-freshness.ts) expires.

Why it happens (suspected):

  • pi-devin-acp spawns with { ...process.env, ...options.env } (lib/acp-client.ts), so inner devin acp inherits ORCA_PANE_KEY / ORCA_TAB_ID / ORCA_AGENT_HOOK_* from the Pi PTY. Devin's managed hooks (src/main/devin/hook-settings.ts: DEVIN_EVENTS includes PermissionRequest, PreToolUse, PostToolUse) then report to /hook/devin under the same paneKey as Pi's /hook/pi — last-write-wins per pane, no inner/outer reconciliation.

Anything else that might help:

  • Related but not duplicates: #21051 closed by #21389 (Codex auto-reviewed PermissionRequest → false Needs You; Codex-specific approvals_reviewer mechanism), #11644 open (Claude sticky wait after approval, parallel-batch pairing), #10039 open (multiple inner agents overwrite same outer pane status, OpenCode/tmux), #19722 open (Pi/Grok descendants), #15078 open (heal stuck wait after deny).
  • Possible directions (not doing the PR ourselves): (a) when a pane is Pi-owned, ignore/demote /hook/devin PermissionRequest to a subagent child row instead of lead waiting (cf. Claude child roster); (b) upstream scrub ORCA_* from the devin acp child env in pi-extensions (acp-client.ts), mirroring ORCA_PI_STATUS_OWNED nested-Pi suppression. (a) is Orca-side and matches the #21389 precedent of only turning false-Needs-You into Working on positive evidence.
  • Workaround for now: /devin mode bypass or /devin yolo on (server-side bypass skips request_permission, so no hook fires).
  • TianZuo555/pi-extensions has no existing issue for this (only open issue is #83, no PRs).
  • Reporter context: investigated from a live stuck pane; happy to provide more hook payloads on request, but we will not be opening the fix PR ourselves for now.

Activity

  1. AmethystLiang commented on Sep 22, 2026

    @AmethystLiang
    Contributor

    thanks for reporting. looking into it

  2. nwparker commented on Sep 25, 2026

    @nwparker
    Contributor

    @mmarabel I don't have a Devin account but if you make a PR, I can merge it!

  3. mmarabel commented on Sep 25, 2026

    @mmarabel
    ContributorAuthor

    @nwparker, on it!

  4. nwparker commented on Oct 25, 2026

    @nwparker
    Contributor

    Fixed on current main by #29264: hooks from a nested Devin running under a Pi pane are suppressed while Pi is active, so the pane no longer gets pinned to "Needs input". Verified through the real hook-server path. Please reopen if you still see it on the latest build.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions