Skip to content

Model policy: t3_thread_roles reports an orchestrator that names no effort (#876) - #1299

Merged
scuttletoby merged 2 commits into
mainfrom
fork/orchestrator-model-explicit
Nov 29, 2026
Merged

scuttletoby merged 2 commits into
mainfrom
fork/orchestrator-model-explicit

Conversation

@scuttletoby

Copy link
Copy Markdown
Owner

Part of #876: the last open point, "an orchestrator's own model and effort are always set explicitly".

The question (owner decision of 11-29): an orchestrator thread runs with a model and an effort written in its own thread settings, never the provider default; done when the start path (or the daily check) reports an orchestrator thread whose model or effort is unset, and the docs say so.

What this does

  • A thread always names its model (ModelSelection.model is required in the thread shell), so only the effort can be left to the provider.
  • New apps/server/src/fork/orchestratorEffort.ts: orchestratorEffortProblem(providers, selection) gives a text when the model has an effort control in this machine's catalog and the selection names no effort, read as the model policy reads a pick (pickOfSelection, modelPolicyPickEfforts). A model's ultracode default does not count as a named effort. A model with no effort control, or an instance this machine does not list, is not reported (nothing to name, or T3 cannot tell).
  • t3_thread_roles (the report the assistant reads): each orchestrator row that holds its role gets modelProblem (that text, else null); the assistant's row and a row with a problem always have null. The result's note tells the reader to ask the person to pick an effort in that thread's model picker. It holds with the policy off too, and refuses nothing.
  • The tool declares ProviderRegistry (the catalog); the waits toolkit tests and the fork budget test provide a mock. The tool's description is unchanged, so the fork context budget is unchanged.
  • Docs: a section "An orchestrator's own effort" in docs/fork/model-policy.md, the modelProblem field in docs/fork/assistant.md, and one sentence in the model policy change file.

Left: the decision's "start path (or the daily check)". This PR reports it through the role tool the assistant reads on demand; the composer already warns for a turn with no effort while the policy is on. A report at an orchestrator's turn start or in a daily check (if the owner wants one beyond this) is not built here. If this report is enough, #876's checklist can be ticked and the issue closed.

Tests (failing first on main): orchestratorEffort.test.ts (new) and threadRolesTool.test.ts (rows and the call) failed before the change (3 failed, plus the missing module) and pass after. Run locally: those two, waits.test.ts, playtest.test.ts, taskList.test.ts, ForkAgentContextBudget.test.ts: 6 files, 50 tests pass. Server typecheck clean. Fork checks (schema, upstream files, seams) pass locally.

🤖 Generated with Claude Code

scuttletoby and others added 2 commits November 29, 2026 10:31
…ffort (#876)

An orchestrator runs with a model and an effort written in its own thread
settings, never the provider default (owner decision on #876). A thread
always names its model, so each orchestrator row that holds its role now
has modelProblem: a text when the thread's model has an effort control in
this machine's catalog and the thread names no effort, else null. The
check is orchestratorEffort.ts, read as the model policy reads a pick; it
holds with the policy off too and refuses nothing.

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

Copy link
Copy Markdown
Owner Author

lens: code · reviewer: Claude Opus 5.5 (lens sub-agent) · read at: f8e44fe

blocker: none
major: none
minor: orchestratorEffort.test.ts has no case for the ultracode reading: a Claude model whose catalog ultracode default is on with no options (the doc says it is still flagged, because the raw selection.options replace the defaulted ones), and an explicit { id: "ultracode", value: true } (not flagged). The code handles both. A test would pin the { ...pick, options: selection.options } line.
minor: the test "reports a thread whose only option is no effort" uses temperature: "high", which is an option the policy does not read as an effort. It does not test the driver's no-effort choice (Claude default, OpenCode no-variant through sendsNoEffort), which is also flagged. Rename it, or add the no-effort-choice case.

Checked, no finding:

  • Same reading as the policy: pickOfSelection(providers, selection, true) and then modelPolicyPickEfforts, with only the ultracode default taken out. An alias reads its target's control. A custom or ACP driver's catalog effort id (a role: "reasoning" select) counts. Boolean toggles are never effort ids, so a thinking toggle cannot cause a false flag.
  • No false flags: a model with no effort control, an instance this machine does not list, another provider's id that this driver does not read, the assistant row, and a row with a problem all give null. An effort set in options under the driver's id or a generic effort id clears the flag.
  • Nothing is refused: the result is a string field and the call stays read-only (the test checks the settings are unchanged). The tool description is unchanged. Only the result note grows, and the budget test measures the tool definitions, which it does not touch.
  • Production wiring: currentProviders uses Effect.serviceOption, and the thread toolkit already declares ProviderRegistry through the same toolkitRegistration server context. So the new dependency is provided in production, and the test mocks hide no missing layer. Touched files are fork-owned (fork/, the fork waits toolkit, fork docs) plus the mock lines in the four tests.

State question:

  • It runs again: the call is pure and reads live state each time, so the same answer comes back.
  • It stops half-way: it writes nothing.
  • Old threads with no options (options undefined or []): read as no effort, so flagged when the model has a control. That is the intended rule.
  • An unknown model or instance: null, never flagged.
  • A registry not loaded yet (empty providers, or a model with no descriptors yet): null. It fails quiet, as the doc says ("not reported"), so an early call can miss a real case until the catalog loads.
  • Providers are read only when some pointer is an orchestrator.

🤖 Generated with Claude Code

@scuttletoby scuttletoby added the fork:merge-ready Merge conveyor: lenses done, merge when green (PRs) label Nov 29, 2026
@scuttletoby
scuttletoby merged commit a4c9ab1 into main Nov 29, 2026
33 checks passed
@scuttletoby
scuttletoby deleted the fork/orchestrator-model-explicit branch November 29, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork:merge-ready Merge conveyor: lenses done, merge when green (PRs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant