Capture
One read of Claude Code CLI
2 pages moved out of 189 read.
agent-sdk/typescript Changed · +10 / -1 lines
This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.
from line 2948
}; ``` -Publishes a local `.html` or `.md` file as a hosted artifact page, or lists the user's published artifacts. Omit `action` or pass `"publish"` to publish `file_path`, which is required for the publish action along with `favicon`, one or two emoji for the browser tab. `title` names the published page in the browser tab and gallery when the HTML file has no `<title>` tag. `url` targets an existing artifact to update in place instead of minting a new one, and `force` is a last-resort overwrite that discards another session's published version; on a 409 conflict the normal fix is to re-read, merge, and publish again rather than pass `force`. +Publishes a local `.html` or `.md` file as a hosted artifact page, or lists the user's published artifacts. Omit `action` or pass `"publish"` to publish `file_path`, which is required for the publish action along with `favicon`, one or two emoji for the browser tab. `title` names the published page in the browser tab and gallery when the HTML file has no `<title>` tag. `url` targets an existing artifact to update in place instead of minting a new one. +`force` is a last-resort overwrite that discards a newer version another session published. On a conflict, the failed publish returns the newer content; Claude merges its changes onto that content, or re-reads the artifact, and publishes again. Pass `force` only when the user explicitly asks to discard that version. + Pass `"list"` to enumerate the user's published artifacts; only `limit` and `scope` may accompany it. `scope` defaults to `"mine"`, which lists artifacts the user owns; `"shared"` lists artifacts other people shared with the user, and `"all"` lists both. * `capabilities`: the runtime capabilities the published page uses, keyed by capability name, such as the [connectors the page may call](/docs/en/artifacts#pull-live-data-with-mcp-connectors). The artifact service validates the declaration and rejects a publish that names a capability the account can't use or gives one an invalid config. Pass `{}` to clear a stored declaration, and omit the field on a redeploy to keep it. Requires Agent SDK v0.3.235 or later.
from line 3482
artifactRead?: { slug: string; ver?: string; + seeded?: false; }; }; ```
from line 3489
Returns the fetched content with HTTP status and metadata. +`artifactRead` is present only when Claude fetched an artifact the session can publish to, and it always carries that artifact's `slug`. + +`seeded` is `false` on a read that didn't deliver the page's full source, and that entry carries no `ver`. The field requires Agent SDK v0.3.239 or later. + ### WebSearch **Tool name:** `WebSearch`
from line 4223
``` | Field | Type | Description | -| :------------ | :-------------------- | :------------------------------------------------------------------- | -| `name` | `string` | Agent type identifier (e.g., `"Explore"`, `"general-purpose"`) | -| `description` | `string` | Description of when to use this agent | -| `model` | `string \| undefined` | Model alias this agent uses. If omitted, inherits the parent's model | - -### `McpServerStatus` - - +| :------------ | :-------------
agent-view Changed · +21 / -20 lines
from line 32
If you haven't yet accepted the [workspace trust dialog](/docs/en/permissions#project-allow-rules-and-workspace-trust) for the directory, Claude Code shows it before agent view opens, the same dialog `claude` shows. Accept to save trust for the workspace and continue. If you decline, Claude Code exits without opening agent view. - 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; if you opened agent view by backgrounding a session with `←`, `Esc` returns to that conversation instead. Your sessions keep running while you're away and reappear the next time you open agent view. + Agent view opens with an input at the bottom and a table that fills in as sessions start. Press `Esc` to return to your shell; if you opened agent view by backgrounding a session with `←`, `Esc` returns to that conversation instead. Your sessions keep running while you're away and reappear the next time you open agent view. </Step> <Step title="Dispatch a session">
from line 281
Press `?` in agent view to see every shortcut in context. The table below summarizes them. -| Shortcut | Action | -| :-------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `↑` / `↓` | Move between rows | -| `Enter` | Attach to the selected session, or dispatch if there's text in the input | -| `Space` | Open or close the peek panel for the selected session | -| `Shift+Enter` | Dispatch and attach immediately | -| `→` | Attach to the selected session | -| `Alt+1`..`Alt+9` | Attach to session 1–9 in the focused session's directory | -| `Tab` | On an empty input, browse all subagents. Otherwise apply the highlighted suggestion | -| `Ctrl+S` | Switch grouping between state and directory | -| `Ctrl+T` | Pin or unpin the selected session | -| `Ctrl+R` | Rename the selected session | -| `Ctrl+G` | Open the dispatch prompt in your `$VISUAL` or `$EDITOR` | -| `Ctrl+J` | Insert a newline in the dispatch input | -| `Ctrl+X` | Stop the session; press again within two seconds to delete it | -| `Shift+↑` / `Shift+↓` | Reorder the selected session | -| `Esc` | Close the peek panel, clear the input, or exit. When you opened agent view by backgrounding your session with `←`, the final `Esc` returns to that conversation instead of exiting | -| `Ctrl+C` | Clear the input; press twice to exit | -| `?` | Show all shortcuts | +| Shortcut | Action | +| :-------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `↑` / `↓` | Move between rows | +| `Enter` | Attach to the selected session, or dispatch if there's text in the input | +| `Space` | Open or close the peek panel for the selected session | +| `Shift+Enter` | Dispatch and attach immediately | +| `→` | Attach to the selected session | +| `Alt+1`..`Alt+9` | Attach to session 1–9 in the focused session's directory | +| `Tab` | On an empty input, browse all subagents. Otherwise apply the highlighted suggestion | +| `Ctrl+S` | Switch grouping between state and directory | +| `Ctrl+T` | Pin or unpin the selected session | +| `Ctrl+R` | Rename the selected session | +| `Ctrl+G` | Open the dispatch prompt in your `$VISUAL` or `$EDITOR` | +| `Ctrl+J` | Insert a newline in the dispatch input | +| `Ctrl+X` | Stop the session; press again within two seconds to delete it | +| `Shift+↑` / `Shift+↓` | Reorder the selected session | +| `Esc` | Close the peek panel, clear the input, or exit. When you opened agent view by backgrounding your session with `←`, the final `Esc` returns to that conversation instead of exiting. With [vim editor mode](/docs/en/interactive-mode#vim-editor-mode) on, pressing `Esc` in the input switches from INSERT to NORMAL mode and keeps your text, as in the main prompt | +| `Ctrl+C` | Clear the input; press twice to exit | +| `?` | Show all shortcuts | ## Dispatch new agents
from line 850
| Version | Change | | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| v2.1.239 | With [vim editor mode](/docs/en/interactive-mode#vim-editor-mode) on, pressing `Esc` in agent view's input switches from INSERT to NORMAL mode and keeps your text, matching the main prompt; in NORMAL mode with text still in the input, pressing `Esc` clears it, and pressing `Esc` on an empty input exits, as the [`Esc` shortcut](#keyboard-shortcuts) describes. Before this release, `Esc` cleared the input. | | v2.1.233 | For a session linked to a GitLab merge request, Claude Code writes the row's label in GitLab's `!1234` reference syntax. You can also paste the merge request's URL into the [dispatch input](#filter-sessions) to select that session. Before this release, the label rendered as `#1234`, and a pasted merge request URL matched a session only when its first prompt contained the URL. | | v2.1.227 | [Deleting a session](#what-deleting-a-session-removes) keeps the session and its worktree while another live Claude Code session is running inside that worktree directory. Agent view shows `not deleted` on the row and the reason in the footer, and `claude rm` prints `kept <id>` with the reason, which names the other session's process ID. Before this release, deleting the session removed the worktree while the other session was still working in it. | | v2.1.225 | `claude agents` in a directory you haven't trusted shows the same [workspace trust dialog](/docs/en/permissions#project-allow-rules-and-workspace-trust) that `claude` shows on startup, before agent view opens. Accepting saves trust for that workspace; declining exits without opening agent view. Before this release, `claude agents` opened without asking, so sessions you dispatched from it ran in a directory you'd never been asked to trust.<br /><br />With the list grouped by directory, hovering the mouse over a row highlights it without changing the [dispatch target](#dispatch-to-a-specific-directory); selecting a row with the arrow keys or a click still changes the target. Before this release, moving the mouse over a session in another project silently changed the directory the next dispatched session started in. |