---
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
