Skip to content

pstack-* write profiles fail to spawn with opaque 'Subagent failed to start' when hand-written #7

Closed

Description

@caelaxie

Symptom

run_subagent with profile: "pstack-<slug>" (write-capable profile) returns Subagent failed to start immediately and consistently. The same spawn with profile: "subagent_general" starts fine, and pstack-<slug>-ro read-only profiles also spawn fine after a retry or two.

Observed on devin-cli with plugin cache devin-pstack@0.15.26, macOS, profiles under ~/.config/devin/agents/.

Root cause (found after 4 failed spawns)

poteto-mode's Subagents section says to create a missing pstack-M profile "per /pstack:setup-pstack for the two-file shape" but does not inline the shape. A profile hand-written from the docs differs from what setup-pstack step 6 actually writes:

Field Hand-written (fails) Canonical (spawns)
max-nesting absent 3
allowed-tools explicit list including glob, edit, write absent (write profile)
system prompt custom fixed delegate prompt

Rewriting the two profiles to the canonical shape made both spawn successfully on the next attempt. I did not bisect which field kills the spawn, but the profile shape is clearly validated at spawn time and the failure is opaque about which part is wrong.

Asks

  1. Surface the rejection reason when a profile fails to start (bad frontmatter field, unknown tool name, missing required key). Subagent failed to start gives nothing to act on.
  2. Inline the exact write-profile frontmatter in poteto-mode's Subagents section, or link setup-pstack step 6 explicitly, so agents never hand-roll the shape.
  3. Consider validating allowed-tools entries against the known tool registry at profile load and warning on unknown names (e.g. glob is not a real tool in this environment; find_file_by_name is).

Secondary observation (possibly related, possibly separate)

In a prior session the same day, freshly written pstack-*-ro profiles failed to spawn twice and then succeeded on retry with no file changes. If profile registration is async, newly written profile files are racy to spawn against. Worth checking whether the spawn path caches the agents directory listing.

Activity

  1. caelaxie commented on Oct 19, 2026

    @caelaxie
    ContributorAuthor

    ask 2 is covered by #11: poteto-mode's Subagents section now says to copy the pstack-M.md block in /pstack:setup-pstack step 6 exactly, so a missing write profile is not hand-rolled.

    asks 1 and 3 (surface the spawn rejection reason, validate allowed-tools at profile load) are devin-cli behavior, not this plugin.

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