Skip to content

feat(web): choose agent and model in the New run dialog #75

Description

@FreshlyBrewedCode

Parent

#62

What to build

The UI's New run dialog can only start a run on the config's default agent and that agent's
model. #71 added the run level of the agent choice (ADR 0013 §2): POST /api/runs accepts
agent: { agent?, model? }, and factory start has --agent / --model. The dialog sends
neither, not even from its raw-JSON mode, which edits only the workflow input. In #67's live leg
every opencode run had to be started from the CLI or with curl, and could only be watched and
cancelled from the UI.

  • Add an agent select (claude / opencode, defaulting to the config default) and an optional
    model text field to the New run dialog. Send them as the request's agent.
  • An empty model means "the agent's configured model" (agent.models[agent]). Factory keeps no
    model catalogue (ADR 0013 §2), so the field is free text.
  • Run again should reuse the original run's choice. That needs the run summary to carry the
    run-level agent (today only AgentStepStarted records it).

Acceptance

  • From the UI, a run can start on either agent, with or without a model, and its steps'
    AgentStepStarted show the chosen agent and model.
  • A playwright test covers the dialog sending agent.
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

    taskA single self-contained piece of work that ships as one PR

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions