1 ファイル変更 +35 -5

この更新の概要

agent-viewコマンド実行時に、モデルの選択や実行モード、計算リソース(effort)を指定できるオプションが追加されました。設定ファイル、プラグインディレクトリ、MCPサーバー構成をコマンド引数から直接渡す方法が具体的に記載されています。これにより、エージェントビューから起動されるすべてのバックグラウンドセッションに対して、一括で実行環境を制御できるようになりました。

agent-view +35 -5

claude agentsコマンドで使用可能な--modelや--permission-mode、--effortなどの新しいフラグと、それらを表示するフッターの仕様が追加されました。また、プラグインやMCPサーバー設定をエージェントビュー経由で各セッションに引き継ぐための詳細なコマンド例とフラグ一覧が追記されています。

@@ -37,7 +37,7 @@ claude agents
Agent view opens with an input at the bottom and a table that fills in as sessions start. Press `Esc` at any time to return to your shell. Your sessions keep running while you're away and reappear the next time you open agent view.
Type a prompt describing a task and press `Enter`. A new background session starts on that task and appears as a row showing whether it's working, waiting on you, or done. The new session uses the model shown in the agent view header and the same [permission mode](#permission-mode-and-settings) you'd get running `claude` in that directory.
Type a prompt describing a task and press `Enter`. A new background session starts on that task and appears as a row showing whether it's working, waiting on you, or done. The new session uses the model shown in the agent view header and the same [permission mode](#permission-mode-model-and-effort) you'd get running `claude` in that directory.
Every prompt you enter here starts its own new session. Typing another prompt and pressing `Enter` launches a second session alongside the first rather than sending a follow-up to it. You can run several in parallel this way.
@@ -268,7 +268,7 @@ To make a subagent always run in its own worktree regardless of how it was start
### Set the model
The model name shown in the agent view header is the dispatch default. New sessions you start from the input use this model, which is the same setting [`/model`](/en/model-config) controls in any session.
The model name shown in the agent view header is the dispatch default. New sessions you start from the input use this model, which is the same setting [`/model`](/en/model-config) controls in any session. To override it for the whole agent view session, pass `--model` when opening agent view. See [Permission mode, model, and effort](#permission-mode-model-and-effort).
Each background session can run on a different model. To override it for one session:
@@ -276,11 +276,41 @@ Each background session can run on a different model. To override it for one ses
- Attach to a running session and run `/model` there. The change persists if the session is respawned.
- Dispatch a [subagent](/en/sub-agents) whose frontmatter sets a `model` field.
### Permission mode and settings
### Permission mode, model, and effort
A dispatched session reads its [settings](/en/settings) and [permission mode](/en/permissions) from the directory it runs in, the same as if you had started `claude` there. Dispatching from the agent view input doesn't pass a permission mode, so the session uses the `defaultMode` from that directory's settings or the `permissionMode` from the dispatched [subagent's frontmatter](/en/sub-agents#supported-frontmatter-fields).
A dispatched session reads its [settings](/en/settings) and [permission mode](/en/permissions) from the directory it runs in, the same as if you had started `claude` there.
To set the mode from the shell, pass `--permission-mode` with `claude --bg`. Using `bypassPermissions` or `auto` this way is refused until you have accepted that mode by running `claude` with it once interactively, since those modes let a session you aren't watching act without approval.
To set defaults for every session you dispatch from agent view, pass any of `--permission-mode`, `--model`, or `--effort` when opening it:
```bash
claude agents --permission-mode plan --model opus --effort high
```
The active defaults appear in the footer below the dispatch input.
Without these flags, the session uses the `defaultMode` from that directory's settings or the `permissionMode` from the dispatched [subagent's frontmatter](/en/sub-agents#supported-frontmatter-fields), and the model shown in the agent view header.
Using `bypassPermissions` or `auto` is refused until you have accepted that mode by running `claude` with it once interactively, since those modes let a session you aren't watching act without approval. The same applies whether you pass the mode to `claude agents` or to `claude --bg --permission-mode`.
### Settings, plugins, and MCP servers
Agent view accepts the same configuration flags as `claude` for loading settings, plugins, MCP servers, and additional directories. Each flag applies to agent view itself and is passed through to every session you dispatch from it, so a plugin or MCP server you load this way is available in those sessions too.
| Flag | Effect |
| :- | :- |
| [`--settings <file-or-json>`](/en/settings) | Override settings for agent view and dispatched sessions |
| [`--add-dir <path>`](/en/permissions#additional-directories-grant-file-access-not-configuration) | Grant file access to an additional directory |
| [`--plugin-dir <path>`](/en/plugins) | Load a plugin from a local directory |
| [`--mcp-config <file-or-json>`](/en/mcp) | Load MCP servers from a config file or JSON string |
| `--strict-mcp-config` | Use only the MCP servers from `--mcp-config`, ignoring other MCP configuration |
Repeat `--add-dir`, `--plugin-dir`, or `--mcp-config` once per value. The space-separated form, such as `--add-dir a b c`, is not supported with `claude agents`.
The following example opens agent view with a settings override and one extra directory:
```bash
claude agents --settings ./ci-settings.json --add-dir ../shared-lib
```
## Manage sessions from the shell