Skip to content

[bug] check_work makes a supervisor deny work it just delegated — the #254 guard misfires on delegators #318

Description

@serge-ivo

What happened

Coder Lead (5fab318d), 2026-08-06. User: "Focus on FAS platform. Can you clean it up?"

22:33:44 — the tool log records, unambiguously:

✅ delegate_goal   Delegated. Run 97a46cbc-04ad-43a5-8030-076d4ad9e88a started at depth 1.

and the Lead reports: "FAS platform is still running the cleanup — iteration 0 of 10."

22:35:00 — user: "Did you just do this action or it was done before?"

22:35:15 — the Lead calls check_work, which returns:

✅ check_work  You have not started any work on this instance — there are no runs.
               If you told the user you did something, that was wrong; say so.

and it answers:

The cleanup on FAS platform was done before this conversationI did not trigger it in
this session
; it was already finished when you asked me about it.

It did trigger it, 90 seconds earlier, and the transcript proves it.

Cause

check_work is scoped to the calling instance, correctly and deliberately
(tool-registry.ts:97):

// Scoped to THIS instance, not just the owner … without this an agent could read another of the
// owner's agents' runs and report it as its own — a fresh way to describe work it did not do.
if (!run || run.instanceId !== ctx.instanceId)

But a supervisor's work is not on its own instance. delegate_goal starts the run on the
SUBORDINATE (instanceId: 964594b6…, the FAS Coder). So for a Lead, check_work truthfully reports
zero runs — and then appends (work-report.ts:79):

"If you told the user you did something, that was wrong; say so."

That sentence was written for #254, where an agent denied work it had really done. Applied to a
supervisor it produces exactly the failure it was built to prevent, in the opposite direction:
it instructs the model to retract a true statement, and the model complies.

The Lead already has the right tool — check_delegation — and had used it two turns earlier.
Nothing told it that check_work is the wrong question for a delegator.

Why this one matters

A supervisor that denies delegating is worse than one that cannot delegate. The user now has to
verify every claim against the run log, which is the entire job the supervisor exists to do. It
also poisons the transcript: the next turn is built from a history in which the delegation did not
happen.

Fix

Make the tool aware of what kind of agent is asking. For an instance that supervises anyone,
check_work should report delegated runs too — or refuse and redirect:

"You delegate work rather than running it yourself. Use check_delegation to see runs you started
on your subordinates."

And the no-runs sentence must not assert the user was misled unless it can actually tell.
"There are no runs on this instance" is true and safe. "If you told the user you did something,
that was wrong" is an inference the tool is not entitled to make — it does not know what else the
agent has done, and here it was simply false.

Ideally check_work on a supervisor returns the union: own runs plus runs it delegated (the data is
there — agent_loop_runs carries the instance, and the supervision graph carries the roster).

Verification

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions