Skip to content

Unattended /autoplan records the owner's relayed gate reply instead of refusing it (GST-3068) - #4484

Merged
capy-ai[bot] merged 3 commits into
mainfrom
unattended-autoplan-records-relayed-owner-reply
Nov 18, 2026
Merged

capy-ai[bot] merged 3 commits into
mainfrom
unattended-autoplan-records-relayed-owner-reply

Conversation

@garrytan

@garrytan garrytan commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

An unattended /autoplan run that's handed the owner's reply at the final gate now records it and finishes, the same way whichever instruction file the agent reads.
Before, autoplan/SKILL.md said "never approve" while autoplan/DRIVER.md said to record the relayed reply, so the outcome depended on which file the model followed.
Nothing to do; this fixes existing instructions and adds no new feature.

What changed
  • One gate rule, rendered into both files. AUTOPLAN_UNATTENDED_GATE_RULE (scripts/resolvers/autoplan-driver.ts) renders word for word into autoplan/sections/unattended.md and DRIVER.md step 4. It says three things: never approve on your own judgment; with no owner reply, the run stops at status=gate_pending; record a reply relayed from the owner yourself with gstack-autoplan answer ... --by agent:<id> --owner-reply-file <file of their words>, and never hand the owner the command to run. DRIVER.md's old "You never approve the gate for the owner" line is gone, and its --by human note stays in step 4.
  • SKILL.md's gate step points to that rule. The unattended sentence at the end of the reply-parse paragraph used to say "end here with its GSTACK_RESULT line and never approve". It now says "Read sections/unattended.md and settle the gate by its gate rule instead."
  • gstack-skill-start says the same. Its unattended block tells every skill "never approve a gate; the only exception is the one named in your skill's record rule", but autoplan's record rule named no exception, so an unattended session still read an unconditional ban. Autoplan's record rule now names the relayed-reply exception.
  • No change to gate code. answer --by agent --owner-reply[-file] already existed and already binds the owner's words.
Evidence (GEVA-549, no new paid eval)

GEVA-549's day-one eval (at e671a53, and the same text at a2a421b and 798782a) produced two outcomes from one relayed "rec":

  • An A session followed DRIVER.md: answer --gate-rev 4 --reply "rec" --by agent:claude-opus-5-5 --owner-reply-file ..., then APPROVED and status=complete.
  • An S-full session followed SKILL.md: it refused to record the relayed "rec", told the owner to run the command themselves, and stayed gate_pending.

This PR changes no eval pins or arms.

Size: paid for inside autoplan's existing cap

The rule adds 282 bytes to sections/unattended.md. Autoplan's parity cap (SKILL.md plus sections, 1.1804 × 101,979 bytes) had about 1 byte of room on main, so these cuts in autoplan/SKILL.md pay for it. The cap is not raised.

Cut Bytes Why it's safe
The "What Auto-Decide Means" paragraph "Never auto-decide User Challenges: ..." moved into Decision Classification's User Challenge entry 225 It repeated that entry. Its two extra points ("or a premise is clearly wrong", "never mid-run; the user has context models lack") now sit in the entry, and so do the phrases test/autoplan-phase-order.test.ts checks for.
"At the final approval gate give the original direction, proposed change, reasoning, blind spots and cost of being wrong (Phase 4 gate item)" replaced by "each is a Phase 4 uc<n> approval" 11 net The gate.json step already lists those fields for each uc<n> item (why = you said / both recommend / why / blind spots / cost if wrong).
The last line of Completion, "Suggest /ship when ready to create the PR." 46 Option A already says "write review logs, suggest /ship".
The unattended gate sentence in the reply-parse paragraph, rewritten as a pointer 12 It's the old rule, replaced by the pointer.

That's 294 bytes cut against 282 added: the union is 120,360 bytes, 15 under main's 120,375. The 12 per-host SKILL.md size pins in test/fixtures/skill-md-size-allowlist.json go down to the new sizes (pins only go down).

Tests
  • New test/autoplan-unattended-gate-rule.test.ts checks five things:
    • the rule appears word for word in the rendered unattended.md and DRIVER.md;
    • rendered SKILL.md, unattended.md and DRIVER.md contain no "never approve" sentence without the own-judgment condition;
    • a negative control: the detector catches GEVA-549's two old sentences;
    • SKILL.md's gate step points to the rule;
    • every flag the rule names is one bin/gstack-autoplan parses.
  • test/gstack-skill-start.test.ts checks that autoplan's unattended block names the exception and that no other skill's block mentions --owner-reply.
  • test/host-conformance.test.ts checks the new pointer text instead of the removed "end here".
  • Local run: typecheck clean; 51 files (every test that reads autoplan's SKILL.md, plus parity, size, freshness, context, catalog, module-size, changelog and tripwire guards): 1,573 pass, 1 fail. The failure was a 5,001 ms timeout in gstack-skill-start's "autoplan guard line" test under load. It passed alone at the same tree in 3,285 ms, so it's marked flaky.
Review notes (below the blocking floor, not fixed here)

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • INFORMATIONAL scripts/resolvers/autoplan-driver.ts:88 Gate rule's answer command omits --rec-hash; a copied rec reply after recommend is refused with GATE_REC_STALE, which names the hash (fails safe, one retry)
  • INFORMATIONAL autoplan/sections/unattended.md.tmpl:9 'Relayed to you' is prose-only; the CLI cannot verify the words came from the owner. DRIVER.md already allowed this before the PR; needs a policy call (narrow wording or a provenance field)
  • INFORMATIONAL autoplan/SKILL.md.tmpl:403 Unattended branch defers to the gate rule, which does not mention APPLY:/amend_pending handling or owner-brief close; DRIVER.md step 4 covers APPLY:
  • INFORMATIONAL docs/unattended.md:42 Human doc still says the skill never approves; humans only, nothing runs wrong
Documentation

Status: updated (one factual correction, no blockers)

Scope: base 44170d6 to head d36b3ae on unattended-autoplan-records-relayed-owner-reply, with 2 commits and 14 committed files, and no staged, unstaged or new files. The change gives unattended /autoplan one gate rule, rendered from scripts/resolvers/autoplan-driver.ts into autoplan/sections/unattended.md and autoplan/DRIVER.md: a session never approves on its own judgment, and it records an owner's relayed reply with --owner-reply-file. gstack-skill-start names the same exception.

Documentation health:

  • docs/unattended.md: Updated. The terminal-line section no longer says /autoplan always ends gate_pending; it now says that happens only when there is no owner reply, and how a relayed reply is recorded.
  • docs/troubleshooting.md: Current. owner-reply-required already documents --owner-reply-file.
  • autoplan/*.tmpl: Current. These are the authored sources of the change.
  • README.md, AGENTS.md, docs/skills.md: Current. No gate details there.

Coverage debt: AUTOPLAN_UNATTENDED_GATE is an internal resolver. The relayed-reply path has reference coverage in docs/unattended.md and docs/troubleshooting.md and how-to coverage in docs/unattended.md step 4. It has no tutorial (a common gap, not critical).

Diagram drift: none found.

Agent notes
  • R56: this is a correctness fix to existing instructions, not a new part of gstack, so it needs no new evidence that it helps. GEVA-549's two runs are the evidence.

  • Out of scope and left alone: capy/skill/gstack/SKILL.md ("an unattended run never approves its own gate", which is still true); DRIVER.md's --words-by agent:<id> command line (gate semantics).

  • Decision trail: captain drive reports/GSTA-611-decisions.tsv.

  • Thread GSTA-611, issue GST-3068.

  • Plan: exempt: bug fix (R65)

  • Plan check: exempt bug fix

  • REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=0 fixed=0 scope=frozen dispatches=1

  • Pre-Landing Review: 4 issues — 0 auto-fixed, 0 asked (0 fixed, 0 skipped), 0 deferred, 4 noted

  • Gate edits: none detected (4 listed, 2 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)

  • Post-review edit: docs/unattended.md's terminal-line paragraph no longer says the final gate is never approved (Step 14.5 docs audit, commit 2b08808), one scoped reader clean (anthropic/claude-opus-5-5), not a review round.

Approvals

No approvals recorded for branch unattended-autoplan-records-relayed-owner-reply.
Plan: exempt: bug fix (R65)

{
  "schema_version": 1,
  "pr": 4484,
  "head": "2b088085b8f280e35d55a40a792994994785b2d8",
  "version": "1.100.0.0",
  "base": "main",
  "gate": {
    "test": {
      "pass": 1696,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "test",
      "run": 44292870257,
      "attempt": 1,
      "tree": "7f7f05b6516ab351fcd43f937e91edcb08b2d650"
    }
  ],
  "calls": 19,
  "session_kind": "unattended",
  "run": "ship-4484-d36b3aea",
  "head_tree": "7f7f05b6516ab351fcd43f937e91edcb08b2d650",
  "product_patch_id": "f44b417ea77a8c5a92facd7667000a58d1d995e6",
  "gstack_version": "1.100.0.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 53,
    "rules": "1afa38a4be3b5eef",
    "base": "44170d67916dc80a008803f7b3f7cbf7dbe32ea7",
    "registry": "44170d67916dc80a008803f7b3f7cbf7dbe32ea7",
    "gate_scan": {
      "tagged": 0,
      "head": "2b088085b8f280e35d55a40a792994994785b2d8"
    },
    "reasons": [
      "runtime=53"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @7f7f05b6516a (8 checks, current for 2b088085b8f2)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44292870257/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44292870012/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=7f7f05b6516a tests=37815 skipped=104 runs=44292870257/1 profiles=ci-reuse/free-tests heads=2b088085b8f2 verified=2026-11-18T11:22:42.808Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "docs/, README.md, CLAUDE.md, AGENTS.md, CONTRIBUTING.md"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 0,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "dispatches": {
      "specialist": 1
    }
  },
  "gate_dispositions": []
}

Open in Capy

garrytan and others added 2 commits November 18, 2026 10:32
…(GST-3068)

SKILL.md and its unattended profile said to end at the gate and never approve, while DRIVER.md said to record a relayed owner reply with --by agent --owner-reply. One rule now renders into both, and gstack-skill-start's unattended block names the same exception.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Folds the duplicate 'Never auto-decide User Challenges' paragraph into Decision Classification, drops the restated gate-item contents already in the gate.json step, and drops the closing /ship suggestion that option A already makes. Moves the unattended pointer back to the end of the reply-parse paragraph, where gate-list.test.ts reads it.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

…e gate

The terminal-line section still said the final gate is never approved. A session now records the owner's own relayed reply; it still never approves on its own judgment.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit bbf48aa into main Nov 18, 2026
53 checks passed
This was referenced Nov 18, 2026
capy-ai Bot added a commit that referenced this pull request Nov 18, 2026
- A test, or a scratch repository in the temp directory, can no longer write approval rows into your real Capy Drive (GST-3027). (#4466)
- An unattended /autoplan run on Claude Code no longer says the publication guard is off while it is on. (#4481)
- A phase report written only in reasoning now gets a denial that says so and names the fix. (#4481)
- `gstack-autoplan revise` no longer refuses a plan that the first `next` accepted. (#4470)
- `revise --plan` with a different file now says the run follows that file. (#4470)
- A second-model plan review in `/autoplan` is no longer reported as unavailable when it actually ran (GST-3051). (#4471)
- The /ship conductor trial plan now lets case reverts that conflict with later code be resolved by hand in docs, tests and the planted file, so large pull requests can be cases (GST-3003). (#4460)
- A locked plan for a trial of /ship without its separate conductor subagent (GST-3003). (#4456)
- A driven /ship now runs each phase as one command, counts its calls, and stops itself at 100 minutes. (#4451)
- /ship stops asking owners to clear two kinds of bookkeeping noise: base-side merge text and a reviewer's confirmation prose. (#4458)
- A base merge that only touched base-side text no longer stops `/ship` finish for an owner's grant. (#4458)
- A reviewer's confirmation prose no longer becomes a Critical finding that only an owner can clear. (#4458)
- A CI run that passed only after its failed jobs were re-run is now marked wherever gstack reuses it. (#4473)
- /ship reuses CI's passing test run when merging the base changed no file, and stops instead of quietly starting hour-long test runs or reviewing an empty diff (GST-3019). (#4461)
- /ship on Codex no longer stops at the test coverage audit. (#4489)
- A cold first-use check before an app build reaches its owner (GST-3025). (#4465)
- `skill_prefix=true` now survives updates when gbrain is installed. (#4454)
- The OpenClaw docs no longer send you to ClawHub, which held only April 2026 builds of office-hours, ceo-review and retro and no longer has gstack skills (the docs also said four skills while listing three). (#4454)
- `gstack-issue-links` no longer reads other repositories' issues as gstack's. (#4454)
- /ship's pre-gate finds the tests of a monorepo app that imports through its own `@/` alias. (#4464)
- /office-hours explains why it recommends a mode. (#4450)
- /office-hours keeps its 34 founder videos and essays out of the skill file. (#4463)
- Two `gstack-owner-answers add` runs for the same answer no longer collide. (#4490)
- A Captain can check an ask against the owner's earlier answers before sending it. (#4467)
- `gstack-post` stops reading /ship's own receipt identifiers as phone numbers, so posting a /ship PR body no longer needs a confirm. (#4488)
- GitHub release notes now list every change in plain words, with a link to its pull request. (#4390)
- gstack's router no longer gives bug reports a special rule, so the model fixes a bug the way it would without gstack. (#4442)
- /ship's review plan now sorts Swift and Xcode files by risk instead of sending every iOS PR to the full review panel (GST-3041). (#4469)
- /ship's review plan now sends Swift code that touches private user data to the full review panel (GST-3052). (#4472)
- A round grant at /ship's review round cap now buys the fix round it names, in the same run or the next (GST-2968). (#4479)
- The secrets check stops flagging three kinds of ordinary code as a secret, and catches two misses. (#4457)
- A security finding's location and reason no longer go into a PR body. (#4486)
- The token-capped /ship child on Claude Code now starts its prompt with the typed `/ship` command, so the skill actually loads. (#4487)
- A /ship receipt now counts the second-model review's blocking findings, and refuses to be written while one is still open. (#4485)
- A `/ship` with a token cap on Claude Code no longer stops at its first handoff. (#4452)
- /ship's push step now always ends with one line that says whether it pushed (GST-3053). (#4474)
- A PR's review-round count can no longer be overwritten by the body `/ship` posts. (#4440)
- One queued record with a malformed path no longer stops artifacts sync for every project. (#4455)
- A failed artifacts push stays reported until a push succeeds. (#4455)
- The /sync-gbrain memory row no longer says OK when pages failed to import. (#4455)
- ### Tests (#4495)
- A policy-floor test no longer fails once gstack's own version reaches the minor after the newest policy key; it now checks a floor above both, so the v1.101.0.0 release can pass CI. (#4495)
- CI now uploads free-suite test results to Trunk with analytics-uploader v2.1.8 and analytics-cli 0.17.0, up from v2.1.6 and 0.16.2. (#4453)
- Packing a checkout for a Ubicloud run no longer fails when git beside it is rewriting a ref. (#4447)
- The /plan-ceo-review HOLD SCOPE eval no longer fails a review because its follow-up question didn't repeat the mode name. (#4447)
- Unattended /autoplan now records the owner's relayed gate reply instead of refusing it. (#4484)
- Unattended /autoplan now runs the second-model review you turned on, and waits for it instead of ending the session. (#4459)
- Two /autoplan runs started in the same second no longer share a run id. (#4459)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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