From a8630f3e1ba0c68a8133a2ae49d98ecc2ca7eeda Mon Sep 17 00:00:00 2001 From: dave Date: Tue, 24 Mar 2026 14:59:32 +0000 Subject: [PATCH] storkit: done 379_bug_start_agent_ignores_story_front_matter_agent_assignment --- ...res_story_front_matter_agent_assignment.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .storkit/work/5_done/379_bug_start_agent_ignores_story_front_matter_agent_assignment.md diff --git a/.storkit/work/5_done/379_bug_start_agent_ignores_story_front_matter_agent_assignment.md b/.storkit/work/5_done/379_bug_start_agent_ignores_story_front_matter_agent_assignment.md new file mode 100644 index 0000000..d58e002 --- /dev/null +++ b/.storkit/work/5_done/379_bug_start_agent_ignores_story_front_matter_agent_assignment.md @@ -0,0 +1,34 @@ +--- +name: "start_agent ignores story front matter agent assignment" +--- + +# Bug 379: start_agent ignores story front matter agent assignment + +## Description + +When a model is pre-assigned to a story via the `assign` command (which writes `agent: coder-opus` to the story's YAML front matter), the MCP `start_agent` tool ignores this field. It only looks at the `agent_name` argument passed directly in the tool call. If none is passed, it auto-selects the first idle coder (usually sonnet), bypassing the user's assignment. + +The auto-assign pipeline (`auto_assign.rs`) correctly reads and respects the front matter `agent` field, but the direct `tool_start_agent` path in `agent_tools.rs` does not. + +Additionally, the `show` (whatsup/triage) command should display the assigned agent from the story's front matter so users can verify their assignment took effect. + +## How to Reproduce + +1. Run `assign 368 opus` — this writes `agent: coder-opus` to story 368's front matter +2. Run `start 368` (without specifying a model) +3. Observe that a sonnet coder is assigned, not coder-opus +4. Run `show 368` — the assigned agent is not displayed + +## Actual Result + +The `start_agent` MCP tool ignores the `agent` field in the story's front matter and picks the first idle coder. The `show` command does not display the pre-assigned agent. + +## Expected Result + +When no explicit `agent_name` is passed to `start_agent`, it should read the story's front matter `agent` field and use that agent if it's available. The `show` command should display the assigned agent from front matter. + +## Acceptance Criteria + +- [ ] start_agent without an explicit agent_name reads the story's front matter `agent` field and uses it if the agent is idle +- [ ] If the preferred agent from front matter is busy, start_agent either waits or falls back to auto-selection (matching auto_assign behavior) +- [ ] The show/triage command displays the assigned agent from story front matter when present