Skip to content

Tasks: each check in a run gets its own checker ceiling - #2461

Merged
AbirAbbas merged 3 commits into
workstreams/mainfrom
workstreams/l-fix9-e2
Nov 6, 2026
Merged

AbirAbbas merged 3 commits into
workstreams/mainfrom
workstreams/l-fix9-e2

Conversation

@AbirAbbas

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #2446. The checker seat has its own spend ceiling, meant as "a seat's own ceiling on one task". On the run road one crew guard serves the whole run, and each run task's calls were marked only with their seat, so the checker's tally ran across every check of the run: once one check had spent the ceiling, every later check was refused on its first call (several checks in one run ended with zero steps).

  • run.crewFactory marks each task's calls with its task id as well as its seat (session.SeatCompleterFor; SeatCompleter keeps its meaning with no mark).
  • SpendGuard keeps the ceiling tally per seat and task when a call carries a task mark; without one it keeps today's per-seat tally (the conversation's single-task crew).
  • Every check's spend still books into the run's per-task tally and the day's tally, so the whole-run ceiling from Tasks: a worker does its own task, and a task tree is bounded in depth, count and spend #2446 and the day caps count all of it. Saved crew records keep their per-seat aggregates; the format is unchanged.
  • The chat manual says each check starts with its own ceiling.

Validation contract → tests

Contract Test
C1 each check task has its own ceiling; a later check can still spend TestEachCheckHasItsOwnSeatCeiling, TestCrewFactoryGivesEachCheckItsOwnCeiling, TestCheckCeilingReservationsStayWithTheirScope
C2 within one check the ceiling holds, across a model fallback TestCheckCeilingSurvivesTheTurnsModelFallback, TestCrewFactoryGivesEachCheckItsOwnCeiling
C3 the run total still counts every check (task-limit ending) TestScopedChecksStillShareTheTaskAndDayLimits, TestScopedCheckSpendEndsTheWholeRunAtTheTaskCap, TestSharedLimitRefusalReleasesTheCheckReservation
C4 an unmarked crew keeps its per-seat ceiling; other seats have none TestUnscopedCrewKeepsItsSeatCeiling
C5 records restore the same totals; older records still work TestScopedCrewRecordRestoresAggregateSpend, TestOlderCrewRecordWithoutScopesStillHoldsItsSeatCeiling

No existing test changed.

🤖 Generated with Claude Code

AbirAbbas and others added 3 commits November 6, 2026 09:00
The checker seat's spend ceiling was meant for one task, but a run shares one
crew guard across all of its tasks, so the ceiling was tallied run-wide: once
one check had spent it, every later check was refused on its first call. Each
run task's calls now carry its task id beside its seat, and the guard keeps the
checker's ceiling per task. Every check's spend still counts toward the run's
per-task limit and the day's limits, and saved crew records keep their per-seat
totals. A crew without a task mark keeps its per-seat ceiling.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review round: the guard raises a call's estimate to the model's last actual
cost on the shared day. With per-check ceilings that let one check's overrun
inflate the next check's first-call estimate past its own ceiling, so the next
check was still refused before it called. A marked check's ceiling hold now
raises its estimate only by that check's own last cost on the model, and each
tally (run total, day, ceiling) releases exactly the amount it held. The run
total and day holds keep their existing conservative estimate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AbirAbbas
AbirAbbas merged commit c5c8ea1 into workstreams/main Nov 6, 2026
7 checks passed
@AbirAbbas
AbirAbbas deleted the workstreams/l-fix9-e2 branch November 6, 2026 14:28
AbirAbbas added a commit that referenced this pull request Nov 13, 2026
… does its own task (#2615)

* Tasks: a worker does its own task, and a task tree is bounded in depth, count and spend

Carries #2446 (a4b3079 on workstreams/main) onto dev. The one conflict, in
beltRunNotice, keeps dev's noticeResultWords and adds the per-task limit words
to its report.

Co-Authored-By: Claude Mythos 5.2 <[email protected]>

* Tasks: a proposed run reads only its assignment, workers add only under their own task, run subtasks keep their parent

Carries #2452 (331433e on workstreams/main) onto dev. It applies cleanly on
top of the carried #2446.

Co-Authored-By: Claude Mythos 5.2 <[email protected]>

* Tasks: each check in a run gets its own checker ceiling

Carries #2461 (c5c8ea1 on workstreams/main) onto dev. It applies cleanly on
top of the carried #2446 and #2452.

Co-Authored-By: Claude Mythos 5.2 <[email protected]>

* Tasks: the older task road refuses duplicate work and holds a tree spend total

Carries #2464 (e30414b on workstreams/main) onto dev. It applies cleanly on
top of the carried #2446, #2452 and #2461.

Co-Authored-By: Claude Mythos 5.2 <[email protected]>

* manual: the per-task tree limit has its own section, so the composer cap question reaches tasks

The carried text made the composer-cap section 3,300 characters and the
question "how much money can a task spend before it stops and asks me" stopped
reaching the tasks page. The tree limit now has its own headed section.

Co-Authored-By: Claude Mythos 5.2 <[email protected]>

* changes: entry for the carried task-tree fixes

Co-Authored-By: Claude Mythos 5.2 <[email protected]>

* Tasks: the node road's tree spend total counts a folded part once

A part a worker proposes runs on that worker and folds its bill into it
when it lands, so the parent's spend already holds the part while the
part's own row keeps its bill too. The tree total summed every node's
spend, counting a child twice and a grandchild three times, and trees on
CODEAF_TASK_BELT=node stopped at a fraction of their limit.

The fold now marks the dollars it moved into the ledger worker, the mark
travels with the worker's money into its node, and the tree total takes
those folded dollars off each node's bill. The checkpoint keeps the
folded part so a restored tree counts the same way.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Tasks: a per-task raise is the tree's ceiling, including a live raise

The whole-tree dollar ceiling on the run road read the profile's per-task
cap alone. A raise the person gave one task (a proposal's or a rerun's
raise_cap_usd, routed into the crew's guard, or a running task's live
change) reached only the guard, so the engine still stopped the run at
the old figure and its ending told the person to raise a limit they had
just raised.

The tree ceiling now starts from the higher of the profile's cap, the
hand-off's raise and the crew guard's cap. The run spec carries a live
ceiling the engine reads at every spend reading, and a live raise lifts
it along with the guard. The guard's refusal sentence names the raised
figure, and its per-task limit is read under its lock now that a raise
can move it while calls are made.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Tasks: a run its per-task limit ended says so once, under its row

The per-task limit sentence was appended to whatever the run's ending
already said. When the engine's tree ceiling cut a run before any seat's
call was refused (the hand test: /crew cap task 0.002, then a /task),
the note led with "ran and did not finish" and kept the sentence on a
second line, and nothing recorded the crew's stop, so the row had no
line under it and the Tasks column did not list the task. When the
crew's guard refused the root's own call, the sentence was the worker's
failure and was appended again, so the report said it twice.

The ending now puts the sentence where a worker's failure stands, once,
in the report and the outcome note, and a routed crew records it as its
stop when nothing else did, which is what draws it under the row and
lists the task as needing the person, as before the tree ceiling.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* manual: a proposed run reads only its own assignment

The tasks page's "What a task is" said every task's brief carries the
person's message word for word and a journal pointer, with a run-road
proposal only putting its own work first. A proposed run's brief is its
title, work, deliverable and done-condition and nothing of the
conversation (proposalBrief), as how-tasks-run already says. The
paragraph now tells the two apart, and a manual test holds it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* plandb: a pivot is counted as the work that survives it

`plandb task pivot` adds its replacement children before it cancels the
subtree they replace, because cancelling a parent's last open child
completes the parent and the add would then be refused. The new tree and
worker gates read the doomed children as still open, so a worker that
had added three parts and replaced them with three others was refused at
its five, and a replacement keeping a replaced part's title was refused
as a duplicate.

The bounded add now takes the open tasks the pivot is about to cancel
and leaves them out of the counts and the taken titles. Finished work
the pivot keeps still counts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* changes: the carried task-tree entry names the fixes made before merge

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Tasks: a run that finished at its ceiling is no per-task limit stop

The engine ends a run done with Limit cost when its final receipt crosses
the tree's ceiling. The limit helpers fired on Limit cost alone, so such a
finished run recorded the per-task limit as its crew's stop: the task sheet
drew a limit warning, "run again with a stronger crew" was hidden and the
routine completion was dropped. taskLimitWords now answers nothing for a
run the engine ended done, as dev never stopped a crew for one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Mythos 5.2 <[email protected]>
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