Skip to content

fix(#934): defer plan authorship under --start-paused to the first tick - #981

Open
0frankie wants to merge 1 commit into
mainfrom
fix/934-defer-paused-plan-authoring
Open

fix(#934): defer plan authorship under --start-paused to the first tick#981
0frankie wants to merge 1 commit into
mainfrom
fix/934-defer-paused-plan-authoring

Conversation

@0frankie

@0frankie 0frankie commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Closes #934.

What

Under --brain llm --start-paused, boot built the default world and the LLMPlanner authored every default persona's day at attach time — real plan calls — then a pre-start POST /config threw that world away and re-authored for the applied cast. ~$0.13 (~2%) wasted on showcase candidate 1, scaling with default-cast size and the plan model's price, and the discarded personas muddied the lifetime by_actor ledger.

Fix

The issue's suggested shape: PennStepper grows defer_plans (wired to --start-paused in main()).

  • attach_agents holds each agent on its safe static day (source "deferred" — the same fallback an unusable model answer gets). Seeding still runs its planner-present branches: the planner will read that memory, just later.
  • The first tick() authors for the cast that is actually running — behind the budget guard, under the app lock — then re-stamps the manifest so the stored provenance describes the authored day. Every rebuild re-arms the deferral, so a pre-start re-cast stays free.
  • The authoring block is extracted from attach_agents into cognition.author_llm_plan and shared by both paths, so they cannot drift.
  • The mock path is unchanged (MockPlanner is free); the boot PLAN line says "deferred" instead of misreporting 0/N.

Verification

  • Red: new test_paused_boot_plans_934.py first pinned today's waste (boot spends day_outline plan-role calls with defer_plans=True requested).
  • Green: 4 tests — no plan spend until the first tick + authored-exactly-once, undeferred boot unchanged, manifest re-stamp (via a real RunStore), mock unaffected.
  • Full suite 2472 passed / 2 skipped (test_godot_smoke deselected — it times out in any fresh worktree with no imported .godot cache, including on the untouched base commit).

🤖 Generated with Claude Code

Under --brain llm --start-paused, boot built the *default* world and the
LLMPlanner authored every default persona's day at attach time -- real
plan calls -- then a pre-start POST /config threw that world away and
re-authored for the applied cast. ~$0.13 (~2%) wasted on the showcase
candidate-1 run, scaling with default-cast size and the plan model's
price, and the discarded personas muddied the lifetime by_actor ledger.

PennStepper grows defer_plans (wired to --start-paused in main): attach
holds each agent on its safe static day (source "deferred", the same
fallback an unusable model answer gets -- seeding still runs its
planner-present branches, since the planner will read that memory) and
the first tick authors for the cast that is actually running, behind the
budget guard, then re-stamps the manifest so the stored provenance
describes the authored day. Every rebuild re-arms the deferral, so a
pre-start re-cast stays free. The authoring block is extracted from
attach_agents into cognition.author_llm_plan and shared by both paths,
so they cannot drift. The mock path is unchanged (MockPlanner is free).

Verified: full suite 2472 passed / 2 skipped (test_godot_smoke deselected
-- it times out in any fresh worktree with no imported .godot cache,
including on the untouched base commit).

Closes #934.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.

serve_penn --start-paused burns paid plan calls for the default cast before /config re-casts

1 participant