GeezerVison is showing github.com — task_start: a pinned claude model id runs on the worker path · coderbuzz/orchestrator-kit@58cc28c
This repository was archived by the owner on Nov 2, 2026. It is now read-only.
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: CHANGELOG.md +3Lines changed: 3 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | # Changelog | 2 | 2 |
| | 3 | +## Unreleased | | 4 | +- `task_start` runs a claude-code task whose model is a full model id (e.g. `claude-haiku-5-5`) on the worker path (`claude -p --model <id>`): the session's Agent tool accepts only the aliases opus/sonnet/haiku, and an alias follows whatever the Claude Code version maps it to (haiku resolved to Haiku 4.5). | | 5 | + | 3 | 6 | ## 0.7.4 (2026-10-14) | 4 | 7 | - `Server.call` refuses a call missing a required argument of the tool schema, naming it (was a bare `KeyError`). | 5 | 8 |
| |
Collapse file Copy file name to clipboardExpand all lines: orchestrator_kit/mcp.py +6-1Lines changed: 6 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 22 | 22 | P = {"project": {**S, "description": "Workspace project folder name (see `projects`)"}} | 23 | 23 |
| 24 | 24 |
| | 25 | +NATIVE_ALIASES = ("opus", "sonnet", "haiku") # the only model names the session's Agent tool accepts; a full model id runs on the worker path | | 26 | + | | 27 | + | 25 | 28 | def tool(name, description, props=None, required=()): | 26 | 29 | return {"name": name, "description": description, | 27 | 30 | "inputSchema": {"type": "object", "properties": {**P, **(props or {})}, "required": ["project", *required]}} | @@ -167,7 +170,9 @@ def _task_start(self, _, a): | 167 | 170 | t = c.task(a["task_id"]) | 168 | 171 | agent = c.reg.agents[t["assigned_agent"]] | 169 | 172 | skill = c.reg.agent_skill(agent["id"], t["skill"]) if t.get("skill") else None | 170 | | - if (h := c.reg.ai_for(agent["id"], skill, t.get("ai")).get("harness")) not in (None, "claude-code"): | | 173 | + h = c.reg.ai_for(agent["id"], skill, t.get("ai")).get("harness") | | 174 | + pinned = c.reg.native_model(agent["id"], t.get("skill"), t.get("ai")) not in (None, *NATIVE_ALIASES) # the Agent tool takes aliases only | | 175 | + if h not in (None, "claude-code") or pinned: | 171 | 176 | return {"task_id": t["task_id"], "dispatched": True, **c.dispatch(t["task_id"])} # worker harness: run it here, no subagent to call | 172 | 177 | t = c.start(a["task_id"], actor=c.actor) | 173 | 178 | _, prompt = c.prompt(t, agent, skill) | |
Collapse file Copy file name to clipboardExpand all lines: tests/kit/test_task_start_dispatch.py +14Lines changed: 14 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -26,3 +26,17 @@ def test_missing_required_argument_is_refused_by_name(tmp_path): | 26 | 26 | s = Server(tmp_path, tools=list(core_tools(Pack.load(Registry().root)).values())) | 27 | 27 | with pytest.raises(Refused, match=r"task_close: missing required argument\(s\) \['outcome'\]"): | 28 | 28 | s.call("task_close", {"project": "p", "task_id": "t", "reason": "x", "why": "x"}) | | 29 | + | | 30 | + | | 31 | +def test_a_pinned_claude_model_id_runs_on_the_worker_path(tmp_path): | | 32 | + (tmp_path / "p").mkdir() | | 33 | + fake = FakeHarness() | | 34 | + s = Server(tmp_path, invoke=fake) | | 35 | + s.call("project_init", {"project": "p", "name": "P", "daily_budget_usd": 5}) | | 36 | + c = fake.orch = s.company("p") | | 37 | + agent = next(a for a in c.reg.enabled_agents if c.reg.agents[a]["type"] != "orchestrator") | | 38 | + mk = lambda model: s.call("task_add", {"project": "p", "agent": agent, "objective": "o", "criteria": ["c"], # noqa: E731 | | 39 | + "ai": {"harness": "claude-code", "model": model}}) | | 40 | + assert "subagent_prompt" in s.call("task_start", {"project": "p", "task_id": mk("haiku")}), "an alias stays on the native path" | | 41 | + out = s.call("task_start", {"project": "p", "task_id": mk("claude-haiku-5-5")}) | | 42 | + assert out["dispatched"] is True and [x["model"] for x in fake.calls] == ["claude-haiku-5-5"] |
Collapse file Copy file name to clipboardExpand all lines: uv.lock +1-1Lines changed: 1 addition & 1 deletion
|