anthropics / anthropics/claude-code

[FEATURE] Agent view: /new panel to set model, effort, name, permission mode and isolation before dispatching a session

Open
#94,889 0 comments 0 reactions 0 assignees View on GitHub
area:agent-view area:tui enhancement
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

### Preflight Checklist

- [x] I have searched existing requests and this feature hasn't been requested yet (closest ones below were auto-closed as stale, not declined)
- [x] This is a single feature request (not multiple features)

### Problem Statement

In agent view (`claude agents`), the dispatch input can only change the **model** before a session starts (`/model opus`). Everything else about a new session has to be decided *outside* the view or fixed *after* dispatch:

- **Effort**: `/effort` in the dispatch input shows `attach to a session to run it`. Per-session effort is only possible via `claude --bg --effort …` in a shell, via `claude agents --effort …` (applies to *every* dispatch), or via a subagent file.
- **Name**: sessions are auto-named from the prompt; the only option is `Ctrl+R` after the fact.
- **Permission mode / isolation (worktree vs in-place)**: same — flags on the shell command or a subagent file, not from the view.
- **Discoverability**: nothing in the view tells you that `/model` works in the dispatch input but `/effort` doesn't. #67078 was closed with "option A is a gap in our docs".

The result: you dispatch with defaults, attach, change settings, and the first turn already ran with the wrong model/effort — or you leave the view and go back to the shell, which defeats the purpose of having a single dispatch surface.

### Proposed Solution

A `/new` command in the agent view dispatch input that opens a small pre-launch panel — same interaction style as the `/diff` panel — with fields pre-filled from the current dispatch defaults:

```
╭─ New session ──────────────────────────────╮
│ Name fix-quotes-modal │
│ Model ▸ sonnet opus haiku │
│ Effort low ▸ medium high xhigh │
│ Permission ▸ default acceptEdits plan │
│ Isolation ▸ worktree in-place │
│ Directory ~/projects/app │
│ Prompt ______________________________ │
╰─ Enter dispatch · Tab next · Esc cancel ───╯
```

Key properties:

1. **Opt-in, zero added friction.** Typing a prompt and pressing Enter keeps working exactly as today. Only `/new` opens the panel, and Enter on an untouched panel dispatches with the defaults.
2. **Inline form for power users**, reusing the existing CLI flag names so there's no new syntax to learn:
`/new --model opus --effort high --name fix-login -- refactor the login flow`
3. **Validated choices.** The panel only offers models/effort levels/permission modes that are valid for the account and model, instead of failing after dispatch.
4. **Optional: save as preset.** `/new fix` loads a saved combination. Today the closest thing is a subagent file per combination (`model`, `effort`, `permissionMode`, `isolation` in frontmatter), which works but means one file per settings combo and mixes "who the agent is" with "how this run is configured".

### Alternative Solutions

- **Accept more commands in the dispatch input**, the same way `/model` already works: `/effort high`, `/name fix-login`, `/permission-mode plan`, each setting the next dispatch. Smaller change, but still undiscoverable and multi-step.
- **Current workarounds**: `claude --bg --name … --model … --effort … -w` from a shell; `claude agents --model … --effort … --permission-mode …` (applies to every dispatch in that view); a dedicated subagent file per combination.

### Priority

Medium - Would be very helpful

### Feature Category

Interactive mode (TUI)

### Use Case Example

A typical loop: I review a screen of an app, find 3–4 small defects, and dispatch one background session per fix while I keep reviewing.

1. Defect A is a trivial layout fix → `/new`, pick `sonnet` + `medium`, name `fix-modal-width`, in-place, Enter.
2. Defect B is a calculation bug that needs a test first → `/new`, pick `opus` + `high`, name `fix-total-calc`, worktree, Enter.
3. Both rows appear already named and running with the right settings — no attaching to switch model/effort, no throwaway first turn, no shell round trip.

### Additional Context

Related requests (all closed by the stale bot, none declined):

- #74735 — Allow opening a new empty chat directly from the Agents view (to pick model / run commands before the first prompt)
- #62211 — Allow per-session model and effort overrides from `claude agents` dispatch input
- #67078 — Per-session model at dispatch time (closed as completed: `/model` in the dispatch input; effort/name not covered)
- #62853 — Agent view: slash commands treated as prompts

Checked against the agent view docs (https://code.claude.com/docs/en/agent-view) on Claude Code 2.1.273.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the agent view dispatch input and compare its existing /model behavior with the /diff panel interaction described in the issue. Review the agent-view documentation and current CLI flags for model, effort, name, permission mode, and isolation. Done means /new can launch a session with validated settings while leaving ordinary prompt dispatch unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.