mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-18 22:24:17 +01:00
Unattended /autoplan on Claude Code says its phase guard is on, and a report hidden in reasoning gets a clear fix (GST-3062) (#4481)
An unattended /autoplan run on Claude Code now says its phase guard is on, instead of saying it is off while the guard blocks it. A phase report written only in reasoning now gets a denial that says so and names the exact command to send. Why: in the day-one eval, two runs were blocked by a guard their own record called off, and one run ended blocked after four publish attempts whose report was invisible. Nothing to do. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
f87d4325a3
commit
44170d6791
19 files changed
+244
-34
No files matched your search
@@ -214,8 +214,23 @@ be verified, so Claude Code is not writing it to the journal in time.
|
||||
<a id="publication-missing"></a>
|
||||
### `publication_missing`
|
||||
No filled report for the previous phase appears after its close packet Read.
|
||||
Publish it as your own assistant text in a message whose only tool call is
|
||||
Publish it as your own visible assistant text, starting with the line
|
||||
`**Phase <N> complete.**`, in a message whose only tool call is
|
||||
`true autoplan-published <phase>`, then enter the next phase in a later message.
|
||||
The close packet, the active plan or any saved report file does not publish it:
|
||||
the guard's job is to see the report in the conversation, and a file the model
|
||||
can write without sending the report would let a phase start unpublished.
|
||||
|
||||
<a id="publication-not-visible"></a>
|
||||
### `publication_not_visible`
|
||||
A `true autoplan-published` message came after the close packet Read, but
|
||||
none of those messages carried visible text, so nothing was published. Text
|
||||
written in reasoning (thinking) is visible to neither the user nor the guard;
|
||||
an unattended run that keeps putting its report there gets this denial on
|
||||
every attempt instead of a fallback. Send one message whose visible text is the
|
||||
filled report, starting with `**Phase <N> complete.**`, with
|
||||
`true autoplan-published <phase>` as its only tool call, then enter the next
|
||||
phase in a later message. The denial names the exact command.
|
||||
|
||||
<a id="publication-unflushed"></a>
|
||||
### `publication_unflushed`
|
||||
|
||||
+23
-6
@@ -3495,14 +3495,31 @@ keep the line in the review record.
|
||||
### `autoplan guard: not enforced by this host; publication order is unverified (GUARD_NOT_INSTALLED)`
|
||||
|
||||
**Meaning.** The autoplan publication hook only executes inside Claude Code.
|
||||
On every other host, and in every `unattended` session, the hook is present
|
||||
but never runs, so phase publication order rests on the snapshot hashes
|
||||
recorded per phase rather than on the guard.
|
||||
On every other host (Capy, Codex and the other env-var hosts), or when the
|
||||
installed `autoplan/SKILL.md` does not declare the hook, it never runs, so
|
||||
phase publication order rests on the snapshot hashes recorded per phase
|
||||
rather than on the guard.
|
||||
|
||||
**Fix.** Nothing on this host. The line is printed once per run and belongs
|
||||
in the review record; `gstack-artifact validate` requires it for an
|
||||
unattended run. On Claude Code a *missing* hook file still denies every
|
||||
guarded call (a broken install must not pass as an absent one).
|
||||
in the review record; `gstack-artifact validate` requires it (or
|
||||
`GUARD_ENFORCED`) for an unattended run. On Claude Code a *missing* hook file
|
||||
still denies every guarded call (a broken install must not pass as an absent one).
|
||||
|
||||
<a id="guard-enforced"></a>
|
||||
### `autoplan guard: enforced by Claude Code's /autoplan hook ... (GUARD_ENFORCED)`
|
||||
|
||||
**Meaning.** `gstack-skill-start` runs inside Claude Code (`CLAUDECODE` is set
|
||||
and no other host is active) and the installed `autoplan/SKILL.md` declares
|
||||
the publication hook. Claude Code runs that hook whenever `/autoplan` was
|
||||
started as a skill (the slash command or the Skill tool), in an unattended
|
||||
session too: a phase-entry Read or reviewer dispatch is denied until the
|
||||
previous phase's report is published. A session that only reads SKILL.md
|
||||
with the Read tool does not register skill hooks.
|
||||
|
||||
**Fix.** Nothing to change. Publish each phase report as visible message text
|
||||
(not reasoning) in a message whose only tool call is
|
||||
`true autoplan-published <phase>`; the denial codes are in
|
||||
[autoplan-guard-troubleshooting.md](autoplan-guard-troubleshooting.md).
|
||||
|
||||
<a id="review-status-mismatch"></a>
|
||||
### `review-log: status mismatch ... (REVIEW_STATUS_MISMATCH)`
|
||||
|
||||
+9
-6
@@ -47,12 +47,15 @@ it, so `headless` keeps its BLOCK semantics.
|
||||
`timing: analytics skipped (...)` instead of writing to a disk that vanishes.
|
||||
Point `GSTACK_STATE_ROOT` at a durable directory when you want cross-run
|
||||
history (see [state-root.md](state-root.md)).
|
||||
- **The autoplan publication guard is named, not faked.** On hosts that do not
|
||||
execute Claude Code hooks, and in every unattended session, `gstack-skill-start`
|
||||
prints `autoplan guard: not enforced by this host; publication order is
|
||||
unverified (GUARD_NOT_INSTALLED)` once. `gstack-artifact validate` requires
|
||||
that line in an unattended run's `review-record.md`. Claude Code's
|
||||
deny-on-absent behavior is unchanged.
|
||||
- **The autoplan publication guard is named, not faked.** `gstack-skill-start`
|
||||
prints one guard line for /autoplan, chosen by host, not by session kind. On
|
||||
Claude Code with the hook declared in `autoplan/SKILL.md` it prints
|
||||
`autoplan guard: enforced by Claude Code's /autoplan hook ... (GUARD_ENFORCED)`,
|
||||
because the hook denies phase entry there in unattended sessions too. On hosts
|
||||
that do not execute Claude Code hooks it prints `autoplan guard: not enforced
|
||||
by this host; publication order is unverified (GUARD_NOT_INSTALLED)`.
|
||||
`gstack-artifact validate` requires one of the two in an unattended run's
|
||||
`review-record.md`. Claude Code's deny-on-absent behavior is unchanged.
|
||||
|
||||
An unknown `GSTACK_SESSION_KIND` value coerces to `interactive` and says so:
|
||||
`SESSION_KIND: interactive (unknown kind '<x>')`.
|
||||
|
||||
Reference in new issue
Block a user