Skip to content

emrg: the boss tool goes, and a scheduled round decides and acts in one agent #2912

Closed

Description

@argszero

What exists today

Scheduled tasks have a second agent. emrg/tools/boss_tool.py registers a boss tool whose answer is treated as the round's stance, and each of the eight task templates opens with the same instruction:

The round's first step is to call boss — a separate session that owns this task's direction while this one does the work — and to treat its answer as the round's stance; whatever the answer does not mention is still this session's to decide. A session that is not offered boss has no owner to ask, and carries on without one.

The tool spawns a child session in <parent>/sub-agent/sub-boss, gives it its own prompt (emrg/server/prompts/boss.j2), and returns its answer as text. It is offered to scheduled rounds alone: scheduled_task_tool_names() is default_tool_names() plus that one name, and the scheduler puts that list on the round's task message.

Why it should go

The direction question and the work are answered by two different sessions about the same task, and the seam between them costs the round:

  • Every scheduled round pays a cross-session call before it does anything. A round that already has the history, the goal and the next step must hand all of it to a second session and wait.
  • The call can end without an answer. A bound on the child means a round can be left holding a notice instead of a direction; the tool then keeps a four-hour quiet window so the next round does not pay for the same judgement again. A direction that was never given therefore keeps the next rounds from asking at all.
  • The owner decides from a reading of the executor's history, not from the task. That is a second context to keep in step with the first, and it grows the surface every time a template's §0 changes.

One agent deciding and acting in the same round removes all three: the round reads its own history, decides, and works.

What the removal must satisfy

  • The tool goes entirely: emrg/tools/boss_tool.py, emrg/server/prompts/boss.j2, and its runner, session directory, reports and the _boss_asked_at bookkeeping in emrg/server/daemon.py and emrg/session.py.
  • The eight task templates stop calling it, in the section that names it, without leaving a dangling instruction around the gap.
  • scheduled_task_tool_names() exists only to add that one name. Once the name is gone the function equals default_tool_names(), so it is deleted and its call sites use default_tool_names() directly — one list, not two that happen to agree.
  • The tool list in README.md and README.cn.md stops naming it, and scripts/check-rant-citations.py stops whitelisting the prompt file that no longer exists.
  • The tests go with it: tests/test_boss_tool.py is deleted, not rewritten — its cases must not become empty assertions somewhere else — and the four tests that mention it as corroboration, a parameter-domain row, or "the two lists differ by this one name" are updated to what is still true.
  • A guard holds the decision: each of the eight templates is asserted not to mention the tool again, so a rule quietly restored reddens instead of shipping.

Acceptance

  1. uv run --no-sync pytest passes in full, and tests/test_boss_tool.py is gone rather than emptied.
  2. git grep -i boss finds nothing in the repository, apart from .emrg/ session data, dist/, .venv/ and the guard that asserts the absence — see the note below.
  3. The new template guard reddens when the sentence is put back into any one of the eight templates.
  4. Both CI jobs, test and test-windows, pass.

One of these has to give, and this is the reading taken. Points 2 and 3 cannot both hold literally: a guard that asserts the word is absent has to contain the word, so git grep -i boss must hit that one file. The guard is the requirement that keeps the rest true, so point 2 is read as zero hits outside it, and the guard is named here rather than silently exempted. The alternative — spelling the name in pieces so the grep stays clean — would make the guard unreadable to serve a number.

Activity

  1. argszero commented on Nov 16, 2026

    @argszero
    OwnerAuthor

    Handled by #2913

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions