Skip to content

spawn only session-loaded profiles; find poteto-mode in devin's plugin cache - #28

Merged
caelaxie merged 1 commit into
mainfrom
fusion-regular-compat
Oct 25, 2026
Merged

caelaxie merged 1 commit into
mainfrom
fusion-regular-compat

Conversation

@caelaxie

Copy link
Copy Markdown
Contributor

Closes #16
Closes #17

harness-only fixes for devin, in both regular and fusion chats. version unchanged.

profiles load at session start

devin reads custom subagent profiles when a session starts, so a profile written later can't be spawned in that session. the port told agents to create a missing pstack-M profile and then spawn it, so that spawn always failed.

probe on devin 3000.11.3 (swe-2-max, --permission-mode accept-edits):

  • print mode, session fabulous-ancient: probe-pre, written before the session started, returns PONG-PRE. probe-mid (project .devin/agents/) and zz-pstack-probe-user (~/.config/devin/agents/), both written by the session, return Subagent failed to start., and again after sleep 30.
  • devin -r fabulous-ancient (new process, same session): both complete.
  • interactive, session hilarious-scorpio: a second turn in the same process still gets Subagent failed to start.
  • in a real run: fusion session small-adverb lowered how explainer to swe-2-high, spawned pstack-swe-2-high-ro (written two minutes after the session started), and got Subagent failed to start.

poteto-mode's Subagents section and the six routed skills (how, why, reflect, swarm, arena, interrogate) now spawn only listed profiles. An unlisted one falls back to the role's line as written, else to the auto mapping, with a notice. The missing profile is still written, for the next session. setup-pstack step 7 already says its profiles apply to new sessions.

delegate fallback path

With no path from its parent, poteto-agent and the pstack-M block in setup-pstack step 6 searched ~/.config/devin/ and the project's .devin/. devin plugins install puts pstack in ~/.local/share/devin/cli/plugins/cache/<source>/<version>/, so the search never found it. Both now search ~/.local/share/devin/cli/plugins/, the counterpart of upstream's ~/.cursor/plugins/, and the pstack-M block gains poteto-agent's highest-version tiebreak. Existing pstack-M profiles keep the old text until /pstack:setup-pstack runs again.

#16, #17

The review trims from #13: drop the fusion pitfall bullet on guide page 10 and the poteto-help port note. poteto-help says Adaptive instead of Auto.

not changed

Harness proof (wrapper pinned to the head sha, installed text, live non-fusion and fusion turns) will follow as a comment.

Generated with Devin

…n cache

- devin loads subagent profiles when a session starts. a pstack-M
  profile written mid-session returns "Subagent failed to start." in
  that session, even on a later turn. poteto-mode and the routed skills
  now spawn only listed profiles, fall back to the role's line or the
  auto mapping, and write the missing profile for the next session.
- the delegate fallback in poteto-agent and the setup-pstack pstack-M
  block searched ~/.config/devin/ and .devin/, where a plugin install
  never lands. it now searches ~/.local/share/devin/cli/plugins/, the
  counterpart of upstream's ~/.cursor/plugins/.
- drop the fusion pitfall bullet and the poteto-help port note left by
  #13, and say Adaptive instead of Auto.

Closes #16
Closes #17

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

@caelaxie caelaxie left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verdict: changes requested (blocked on harness proof only).

content passes the bar on 341bc58:

  • #16: fusion pitfall bullet dropped, guide page 10 matches upstream 88d4751 again.
  • #17: port note dropped, "Auto" -> "Adaptive", as the issue asked.
  • session-loaded profile fallback in poteto-mode + the six routed skills, and the delegate search path moved to ~/.local/share/devin/cli/plugins/: devin-only harness fixes, minimal, upstream text otherwise untouched. version unchanged is fine.
  • Closes #16 / Closes #17 linkage is right. ci (Validate plugin) green.

missing: this touches plugin content, so it needs real devin proof on the exact head before merge. post it as a comment: devin plugins install --local wrapper pinned to the full head sha 341bc58, devin plugins list, the installed text of poteto-mode / setup-pstack / poteto-agent showing the new search path and fallback, and the live non-fusion + fusion turns you promised (a spawn of an unlisted pstack-M falling back to auto with a notice). symlink-only proof won't count. i'll merge on the next sweep once it's up.

Copy link
Copy Markdown
Contributor Author

harness proof

real devin cli on a local box (no cloud agent, no git clone). pr head 341bc58b91ae8ea13c8bfa411e2b164efd938dbd, checked with git ls-remote refs/pull/28/head before install and again before cleanup. version stays 0.15.32 (the pr doesn't bump it).

  • cli: devin 3000.11.205 (6dea39440ae3). devin auth status → Logged in (via Devin).
  • everything was read-only. live turns ran in a trusted scratch dir whose allowlist only permits reads (Write(**)/Edit(**) denied), in the default auto permission mode. i added no allowlist entries, and no ~/.config/devin/agents/ profiles exist before or after.
# requirement result
1 --local wrapper pinned to the full head sha, then devin plugins list shows pstack v0.15.32 (required) ✅ pass
2 install cache: all 200 files cmp-identical to raw @ head, 0 symlinks, file list = head tree (200 = 200). changed text in poteto-mode, setup-pstack, poteto-agent, and the 6 routed skills is present ✅ pass
3a live regular turn (swe-2-max): unlisted pstack-swe-2-high-ro falls back to auto (subagent_explore) with a notice ✅ pass
3b live fusion turn (fusion-claude-opus-5-5-medium-sidekick-swe-2-medium): same fallback and notice ✅ pass
4 cleanup: wrapper and pstack removed, thermos left alone ✅ pass

1. install / list

$ devin plugins list          # before
Installed plugins

  • thermos v1.0.0

$ cat wrap-pr28/.devin-plugin/plugin.json
{ "name": "pstack-harness-pr28", "version": "0.0.0",
  "requiredPlugins": [ { "source": "github", "repo": "pstack-ports/devin-pstack",
                         "sha": "341bc58b91ae8ea13c8bfa411e2b164efd938dbd" } ] }
$ find wrap-pr28
wrap-pr28
wrap-pr28/.devin-plugin
wrap-pr28/.devin-plugin/plugin.json
wrap-pr28/skills
$ devin plugins install --local -y /workspace/devin-harness/wrap-pr28
This install will add:
  • pstack-harness-pr28 v0.0.0
  • pstack v0.15.32 (required)
      ...
      /pstack:reflect
      /pstack:setup-pstack
      /pstack:poteto-mode
      ...
      /pstack:arena
      /pstack:why
      ...
      /pstack:how
      /pstack:swarm
      ...
      /pstack:interrogate
      ...
✓ Installed pstack-harness-pr28.
  auto-installed required plugins: pstack
$ devin plugins list
Installed plugins

  • thermos v1.0.0
  • pstack-harness-pr28 v0.0.0
  • pstack v0.15.32 (required)
$ devin skills list | grep -c /pstack:
58
$ devin skills list | grep -E '/pstack:(poteto-mode|setup-pstack|how|why|reflect|swarm|arena|interrogate) '
  /pstack:setup-pstack [user,model] (~/.local/share/devin/cli/plugins/cache/github.com_pstack-ports_devin-pstack-816793bb/0.15.32/skills/setup-pstack) - ...
  /pstack:poteto-mode [user] (~/.local/share/devin/cli/plugins/cache/github.com_pstack-ports_devin-pstack-816793bb/0.15.32/skills/poteto-mode) - ...
  ...                         # how, why, reflect, swarm, arena, interrogate: same 0.15.32 cache path

2. install cache: cmp and symlinks

$ cd ~/.local/share/devin/cli/plugins/cache/github.com_pstack-ports_devin-pstack-816793bb/0.15.32
$ grep -n '"version"' .devin-plugin/plugin.json plugin.json
.devin-plugin/plugin.json:3:  "version": "0.15.32",
plugin.json:4:  "version": "0.15.32",
$ find . -type l | wc -l
0
$ curl -fsSL "https://api.github.com/repos/pstack-ports/devin-pstack/git/trees/341bc58b91ae8ea13c8bfa411e2b164efd938dbd?recursive=1"   # blobs -> head.txt
truncated False
symlinks/submodules in tree: []
$ find . -type f | sed 's|^\./||' | sort > inst.txt; wc -l head.txt inst.txt
  200 head.txt
  200 inst.txt
$ comm -3 head.txt inst.txt
(empty)
$ while read f; do curl -fsSL https://raw.githubusercontent.com/pstack-ports/devin-pstack/341bc58b91ae8ea13c8bfa411e2b164efd938dbd/$f -o raw/$f && cmp -s $f raw/$f ...; done < inst.txt
IDENTICAL=200 DIFF/ERR=0
$ # the 11 files the pr touches:
regular file 1356 IDENTICAL agents/poteto-agent.md
regular file 9048 IDENTICAL docs/guide/10-recipes-and-pitfalls.md
regular file 5185 IDENTICAL skills/arena/SKILL.md
regular file 2909 IDENTICAL skills/how/SKILL.md
regular file 4986 IDENTICAL skills/interrogate/SKILL.md
regular file 15683 IDENTICAL skills/poteto-help/SKILL.md
regular file 24080 IDENTICAL skills/poteto-mode/SKILL.md
regular file 5321 IDENTICAL skills/reflect/SKILL.md
regular file 9156 IDENTICAL skills/setup-pstack/SKILL.md
regular file 3586 IDENTICAL skills/swarm/SKILL.md
regular file 9040 IDENTICAL skills/why/SKILL.md

installed text excerpts

$ grep -n 'loads subagent profiles when a session starts' skills/poteto-mode/SKILL.md
93:Devin loads subagent profiles when a session starts, so a profile written mid-session can't start until the next session. Spawn only profiles in your `run_subagent` profile list. When the profile a spawn needs isn't listed, fall back to the role's line as written if its profile is listed, else to the `auto` mapping, and say so.
$ grep -n -o 'search `~/.local/share/devin/cli/plugins/`.*highest `version`\.' agents/poteto-agent.md skills/setup-pstack/SKILL.md
agents/poteto-agent.md:9:search `~/.local/share/devin/cli/plugins/` for a file whose path ends in `skills/poteto-mode/SKILL.md`. If more than one file matches, use the copy whose `.devin-plugin/plugin.json` has the highest `version`.
skills/setup-pstack/SKILL.md:81:search `~/.local/share/devin/cli/plugins/` for a file whose path ends in `skills/poteto-mode/SKILL.md`. If more than one file matches, use the copy whose `.devin-plugin/plugin.json` has the highest `version`.
$ grep -n '~/.config/devin/` and the project' agents/poteto-agent.md skills/setup-pstack/SKILL.md     # old search path
(no match)
$ grep -n -i 'new session' skills/setup-pstack/SKILL.md
111:Tell the user the rule and profiles were written and that they apply to new sessions. Re-running this skill updates both.
$ grep -c 'missing from your `run_subagent` profile list can.t start this session' skills/{how,why,reflect,swarm,arena,interrogate}/SKILL.md
skills/how/SKILL.md:1
skills/why/SKILL.md:1
skills/reflect/SKILL.md:1
skills/swarm/SKILL.md:1
skills/arena/SKILL.md:1
skills/interrogate/SKILL.md:1
$ grep -n 'Putting a Fusion model' docs/guide/10-recipes-and-pitfalls.md      # #16 trim
(no match)
$ grep -o '.\{40\}Adaptive.\{30\}' skills/poteto-help/SKILL.md                # #17
...saves tokens when the chat runs on Adaptive or a cheaper model. On Fusion it...
$ find ~/.local/share/devin/cli/plugins -path '*skills/poteto-mode/SKILL.md'   # the new delegate search path finds it
/home/box/.local/share/devin/cli/plugins/cache/github.com_pstack-ports_devin-pstack-816793bb/0.15.32/skills/poteto-mode/SKILL.md

3. live turns (read-only)

devin --help has no fusion flag. fusion is a model choice: devin models list has a Fusion (fusion) group (fusion-<lead>-sidekick-<sidekick>), so the fusion turn is --model fusion-.... its export says "model_name": "Fusion (Claude Opus 5.5 Medium + SWE-2 Medium)", and its system prompt includes the sidekick tool.

the box's always-on pstack-models rule sets every role to inherit-parent. so the prompt overrides one line for the run (how explorer: swe-2-high), which makes the skill map the explorer to pstack-swe-2-high-ro. no pstack-* profile is installed, so that profile is unlisted. a first pass without the override mapped to subagent_explore and correctly gave no notice (logs pr28-live-*-try1.log).

both turns use the same prompt (--prompt-file):

/pstack:how how does this directory's .devin/config.json permission allowlist decide which tools may run?

harness constraints for this read-only check:
- for this run only, treat the pstack-models rule's `how explorer` line as `how explorer: swe-2-high` (a real slug `devin models list` reports). all other role lines stay as the rule says.
- spawn exactly one explorer, read-only, even though the question is small.
- do not write, edit or create any file (that includes ~/.config/devin/agents profiles; if the skill says to create a missing profile, say you would, do not do it).
- before spawning, list the profiles your run_subagent tool currently offers, name the profile the skill maps the explorer role to, and if that profile is not in the list, follow the skill's fallback and print the exact notice you would give the user on its own line starting with "NOTICE:". then say which profile you actually spawned.
- then answer in under 120 words.

regular (non-fusion), session blend-brow

$ cd /workspace/devin-harness/scratch && devin -p --model swe-2-max --export ../logs/pr28-live-regular.export --prompt-file /tmp/pr28-prompt.txt
**Profiles `run_subagent` currently offers:**
- `pstack:comment-sicko`
- `pstack:poteto-agent`
- `subagent_explore`
- `subagent_general`
- `thermos:thermo-nuclear-code-quality-review-subagent`
- `thermos:thermo-nuclear-review-subagent`

**Explorer mapping:** `how explorer: swe-2-high` → profile `pstack-swe-2-high-ro`. That profile is not in the list above.

NOTICE: Profile `pstack-swe-2-high-ro` (mapped from `how explorer: swe-2-high`) is not loaded in this session; I would create it via /pstack:setup-pstack for the next session, and per the skill's fallback I am using the `auto` mapping (`subagent_explore`) for this spawn.

**Actually spawning:** `subagent_explore` (read-only — the job is doc/config reading only, no `exec` needed).
## How it works
Evaluation order is **deny → ask → allow → prompt** ... (answer trimmed)
exit=0

tool calls from the export: find_file_by_name, exec ls -la, 2× read, run_subagent profile=subagent_explore. no writes.

fusion, session frill-alto

$ cd /workspace/devin-harness/scratch && devin -p --model fusion-claude-opus-5-5-medium-sidekick-swe-2-medium --export ../logs/pr28-live-fusion.export --prompt-file /tmp/pr28-prompt.txt
Profiles my `run_subagent` tool offers right now: `pstack:comment-sicko`, `pstack:poteto-agent`, `subagent_explore`, `subagent_general`, `thermos:thermo-nuclear-code-quality-review-subagent`, `thermos:thermo-nuclear-review-subagent`.

The skill maps `how explorer: swe-2-high` to the profile **`pstack-swe-2-high-ro`**. That profile isn't in the list, so I'm using the `auto` fallback, `subagent_explore`.

NOTICE: Profile `pstack-swe-2-high-ro` isn't loaded this session, so this explorer ran on `subagent_explore` (parent model). To pin swe-2-high next time, create that profile with `/pstack:setup-pstack` and start a new session. I didn't create it, because this run is read-only.

The profile I actually spawned is `subagent_explore`.
Here's how the allowlist in `.devin/config.json` decides what runs: ... (answer trimmed)
exit=0

tool calls from the export: one run_subagent profile=subagent_explore. no writes.

neither turn tried to spawn the unlisted pstack-swe-2-high-ro, so neither hit Subagent failed to start.

4. re-check and cleanup

$ git ls-remote https://github.com/pstack-ports/devin-pstack.git refs/pull/28/head
341bc58b91ae8ea13c8bfa411e2b164efd938dbd	refs/pull/28/head
$ devin plugins remove pstack-harness-pr28 -y
✓ Removed pstack-harness-pr28.
  note: auto-installed required plugins were left in place: pstack
$ devin plugins remove pstack -y
✓ Removed pstack.
$ devin plugins list
Installed plugins

  • thermos v1.0.0

no code was changed, and no secrets appear in this comment.

@caelaxie caelaxie left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pass. harness proof on 341bc58 (comment 6400677882) meets the devin bar: --local wrapper pinned to the full head sha, list shows pstack v0.15.32, 200/200 cache files cmp-identical with 0 symlinks, changed text present in the installed copy, and live regular + fusion turns fall back to subagent_explore with a notice when the profile is unlisted. validate plugin is green, the content passed last review, and it closes #16/#17. squash-merging.

@caelaxie
caelaxie merged commit 9d31392 into main Oct 25, 2026
1 check passed
@caelaxie
caelaxie deleted the fusion-regular-compat branch October 25, 2026 17:16
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.

audit: drop the poteto-help port note left by #13 and say adaptive audit: remove the fusion pitfall bullet added by #13

1 participant