Skip to content

/autoplan tells the agent to write a gate item with id plan, which gstack-gate rejects #4181

Closed

Description

@exGeni

What happened

/autoplan Phase 4 tells the agent to write $_AP/gate.json with one item per user challenge (uc<n>), one per taste decision (d<n>) "and plan". It then says all or plana means approve, and planc/pland/plane mean interrogate, revise, reject (autoplan/SKILL.md:625-629, :666-667; template autoplan/SKILL.md.tmpl:360-364, :401-402, at commit b615592).

gstack-gate refuses that id. ID_RE in lib/gate-list.ts:75 is /^[a-z]*[0-9]+$/, and the render stops, so the gate cannot be shown as the skill describes:

gstack-gate: g.json is not a gate list:
  items[1].id must match [a-z]*[0-9]+ (lowercase label plus a number, e.g. d3, uc1, 12)
exit=1

The helper-built gate in lib/autoplan-gate.ts:269 already uses p1 for this item (id: 'p1', title: 'Plan approval'), and docs/unattended.md:513 names p1 plan approval, so the skill text looks like the part that is out of date. A grep for p1 as an item id in autoplan/SKILL.md and its template found nothing.

The reply tokens fail the same way. gstack-gate parse answers a reply of plana with part of the reply matched no gate item or option, so nothing was applied (unparsed: plana), because the token regex at lib/gate-list.ts:207 needs a digit too. With the item renamed to p1 the gate renders and p1a parses.

Expected: the id and reply tokens in the skill match what gstack-gate accepts.

A likely fix is to change plan to p1, and plana/planc/pland/plane to p1a/p1c/p1d/p1e, in autoplan/SKILL.md.tmpl, then regenerate.

Steps to reproduce

  1. Write a gate list with the skill's id:

    {"schema_version":1,"run":"synthetic","gate_rev":1,"items":[{"id":"d1","title":"x","kind":"auto","recommended":"a","options":[{"key":"a","text":"y"},{"key":"b","text":"z"}]},{"id":"plan","title":"The plan","kind":"approval","recommended":"a","options":[{"key":"a","text":"approve"},{"key":"b","text":"overrides"}]}]}
  2. Run gstack-gate render g.json. It exits 1 with the message above.

  3. Change the id to p1 and run it again. It renders.

Found in a real /autoplan run. Reproduced on the installed 1.98.0.0 with the synthetic file above; the cited lines were read at the commit above, which is 9 commits past the installed build.

Readiness report

gstack doctor 1.98.0.0
ok              install root    ~/.claude/skills/gstack: claude global current (1.98.0.0), agy global current (1.98.0.0), codex global current (1.98.0.0)
ok              rescue refs     none in ~/.claude/skills/gstack
ok              state root      ~/.gstack durable=yes (selected by default)
ok              bun             1.4.4 at /usr/local/bin/bun (floor 1.3.3, tested 1.4.2)
ok              hooks           15 hook(s) parse
ok              codex           codex-cli 0.160.1; self-locate ok; model gpt-6.1-sol (source: GSTACK_CODEX_MODEL)
ok              codex probe     cached MODEL_OK, 31m ago (not re-run; --live probes now)
ok              artifacts sync  status ok (mode full; queue 5)
ok              browse bundle   browse/dist built
ok              binaries        find-browse, design, pdf, gstack-global-discover launch (4 of 4)
ok              cso             native helper 1.98.0.0 (910093087dec)
ok              claude code     2.1.309 (Claude Code) at /usr/local/bin/claude
ok              session journal no session journals for this project
ok              guard log       75 decisions (5 denied)
ok              CLAUDE.md       no gstack section lists skills (~/.claude/CLAUDE.md)
15 ok, 0 warn, 0 not configured, 0 fail

Environment

  • Host (Claude Code, Codex, Cursor, ...) and its version: Claude Code 2.1.309
  • OS: Linux

Activity

  1. capy-ai commented on Nov 9, 2026

    @capy-ai
    Contributor

    Thanks for the detailed report and trace. Reproduced from the description; a fix is in progress, and I'll link the merged PR here when it lands.

  2. added
    S2
    on Nov 9, 2026
  3. capy-ai commented on Nov 9, 2026

    @capy-ai
    Contributor

    Fixed in #4219 (merged as 1b96d9f): autoplan's plan-approval gate item is now p1, with replies p1a, p1c, p1d, p1e, so gstack-gate renders and parses it. It's on main and will ship in the next stable release. Thanks for the clear repro.

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

    S2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions