Skip to content

Feature: Inline model/agent override in task runner + settings UI #143

@jellydn

Description

@jellydn

What

Add inline agent/model selector when running tasks from ralph-tui, plus settings UI for persistent agent configuration.

Why

Current limitation:

  • CLI only: ralph-tui run --agent opencode --model X
  • opencode's default_agent: "plan" forces plan review on every task
  • Can't quickly switch models from TUI for different tasks

Desired workflow:

Select task → Run → Inline picker shows:
  Agent: [opencode ▼]  Model: [claude-3.5-sonnet ▼]  Mode: [build ▼]

How

Part 1: Inline Override (Task Runner)

When executing a bead/task, show inline options:

┌─────────────────────────────────────┐
│ 📋 Task: Implement feature X        │
├─────────────────────────────────────┤
│ Agent: [opencode ▼]                 │
│ Model: [claude-3.5-sonnet ▼]        │  ← NEW
│ Mode:  [build ▼]                    │  ← NEW: build vs plan
│                                     │
│       [Cancel]  [Run →]             │
└─────────────────────────────────────┘
  • Inline changes = one-time override (don't persist)
  • Mode build = direct execution (bypass plan review)
  • Mode plan = plan mode first (requires approval)

Part 2: Settings UI

Add agent configuration to settings screen:

⚙️  Settings
┌─────────────────────────────────────┐
│ Default Agent: [opencode ▼]         │
│ Default Model: [claude-3.5-sonnet ▼]│
│ Default Mode:  [build ▼]            │
└─────────────────────────────────────┘

Supported models:

  • anthropic/claude-3-5-sonnet
  • claude-opus-4
  • openai/gpt-4o
  • openai/gpt-4o-mini
  • openai/o1

Part 3: Config Schema

{
  "agents": {
    "default": "opencode",
    "opencode": {
      "model": "anthropic/claude-3-5-sonnet",
      "mode": "build"
    }
  }
}

Files to Modify

  • src/config/agent-config.ts - Config schema
  • src/ui/screens/settings.tsx - Settings UI
  • src/ui/components/task-runner.tsx - Inline selectors
  • src/agents/opencode.ts - Pass model/mode to opencode

Acceptance Criteria

  • Settings UI has agent/model/mode configuration
  • Task runner shows inline selectors before execution
  • Inline changes are one-time (settings unchanged)
  • Settings changes persist across sessions
  • Mode build bypasses plan review
  • Mode plan respects plan flow
  • Documentation updated

User Flows

One-off model change:

  1. Select task → Run
  2. Change model to "gpt-4o" in picker
  3. Click Run → executes with gpt-4o
  4. Next task uses default model

Persistent preference:

  1. Settings → change default to "claude-opus-4"
  2. All tasks use this model (unless overridden inline)

Labels: feature, enhancement, ux, settings-ui, opencode

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions