curl -LsSf https://langch.in/dcode | bash
# With model provider extras
# OpenAI, Anthropic, and Gemini are included by default
curl -LsSf https://langch.in/dcode | DEEPAGENTS_CODE_EXTRAS="nvidia,ollama" bash
Run:
dcode
The fastest way to start using Deep Agents. deepagents-code is a pre-built coding agent in your terminal — similar to Claude Code or Cursor — powered by any LLM that supports tool calling. One install command and you're up and running, no code required.
What deepagents-code adds on top of the SDK:
By default, dcode trusts the directory you run it in. Human-in-the-loop approval gates model-requested tool calls, but project artifacts are read before any approval prompt.
Do not run dcode in a directory you do not trust without a sandbox backend. For untrusted repositories, use a remote sandbox so execution is isolated from your machine. Running dcode in a directory lets that directory's files shape execution. See THREAT_MODEL.md for details.
See our Releases and Versioning policies.
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
For local setup, see the Development Guide. For contribution policy, see the Contributing Guide.
This project was primarily inspired by Claude Code, and initially was largely an attempt to see what made Claude Code general purpose, and make it even more so.
Resolved model properties needed by the interactive client.
The one-per-process result with named slots to prevent transposition.
Swap the model or per-call settings from runtime.context.
Reads two optional keys from the runtime context dict:
'model' — a provider:model spec (e.g. "openai:gpt-5").
When present andFull configuration payload passed from the app to the server subprocess.
Serialized to/from DEEPAGENTS_CODE_SERVER_* environment variables so
that the server graph (which runs in a separate Python
Raised when a downloaded archive fails SHA-256 verification.
Distinct from generic install failure so callers can surface a loud, user-visible notice — a checksum mismatch is a supply-chain anomaly (
Raised when no managed helper binary is available for this system.
Distinct from transient network/download failures so callers can tell users whether retrying can help or whether they need a differe
Goal/rubric text exceeds a model-visible context budget.
Additive token and estimated-cost accounting for one or more requests.
A priced side-operation delta pending checkpoint persistence.
Use exactly once: every prepare must be either committed (its update
persisted) or rolled back. _drain_recorded_costs is destructive,
Agent state extended with the cumulative thread-cost channel.
Own the thread's cumulative _session_cost_usd checkpoint value.
The main agent owns the thread total. Nested instances checkpoint local deltas before an interrupt can pause their graph, then transf
A transport-independent event delivered from outside the TUI.
Source of external events for the Textual app.
Implementations must be safe to stop() even when start() failed
partway through; the app always invokes stop() from a finally block.
Line-delimited JSON event source over a local Unix domain socket.
The listener creates its parent directory with mode 0o700 and binds the
socket inside it under a transient umask(0o077) so the so
Metadata for a custom subagent loaded from filesystem.
Parsed origin remote attribution for coding-agent-v1 traces.
A NamedTuple so callers can still unpack positionally or index, while the
field names keep the slot order from being load-bearing at e
Raised when an external editor cannot be opened or read.
Explicit user/project path context for project-sensitive behavior.
Line counts for a change, named so the pair cannot be swapped silently.
Keyword-only and frozen so that claim holds at construction as well as in transit: a positional pair is exactly the transpositi
Data used to render HITL previews.
Line and byte level metrics for a file operation.
Track a single filesystem tool call.
Collect file operation metrics during an interaction.
A known reason to skip a cache prompt, distinct from missing pricing.
A cache-using request's start time and effective cache identity.
Prompt-cache behavior needed to decide and price a warning.
Keyword-only because window_seconds and minimum_tokens are adjacent
bare ints: positionally, transposing them builds a plausible-lookin
Estimated input cost for a cold prefix and its warm-cache delta.
Both figures are USD, non-negative, and finite; incremental_cost_usd is
the part of cold_cost_usd that a cache hit would have avoi
Validated data needed to render one advisory warning.
Constructed only after every gate has passed -- a policy resolved, the prefix cleared the provider's cache minimum, and the priced delta reached
ACP server that supplies trusted classifier context in Auto mode.
Represents a pasted image with its base64 encoding.
Represents a pasted video with its base64 encoding.
Stable identifiers for notification actions dispatched by the app.
One button/action row in the notification modal.
Typed payload for a missing-dependency notification.
Typed payload for an update-available notification.
A single notice waiting for user action.
Immutable value object: the registry owns the
key-to-toast-identity binding (see NotificationRegistry) so
external callers cannot corrupt click-routing indi
In-memory store of pending notifications.
Instance-scoped (one per app) so test apps don't pollute each other. Owns the bidirectional key-to-toast-identity binding so callers cannot accidentally desy
JSON-safe workspace descriptor carried in LangGraph runtime context.
Server-authoritative workspace and resource policy for one thread.
A workspace claim or runtime conflicts with server resource policy.
Goal/rubric state channels shared by every schema that touches them.
Declared once here so each schema that carries these channels —
ResumeState and goal_tools.GoalToolState — inherits the same
Extends agent state with per-checkpoint facts restored on resume.
Inherits the shared goal/rubric channels from GoalRubricChannels and adds
the channels unique to resume: the after-model token/spec
Persists per-checkpoint resume facts after each model call.
See the module docstring for why this rides the model node's checkpoint
instead of a separate aupdate_state (avoids a standalone `UpdateS
Versioned, allowlisted policy snapshot persisted beside a binding.
One drifted policy field, reported within the snapshot allowlist.
Structured, secret-free detail attached to a workspace refusal.
Middleware that provides an ask_user tool for interactive questioning.
This middleware adds an ask_user tool that allows agents to ask the user
questions during execution. Questions can be free-for
A different dcode entry point is winning on PATH than the one we upgraded.
Returned by detect_shadowed_dcode after a successful upgrade so the user
can be warned that a manually launched dcode
A single package version change parsed from uv's environment-diff output.
Emitted by both uv tool upgrade and uv tool install -U (the
dependency-refresh path), so the wording stays command-agnost
Raised when uv tool requested requirements cannot be preserved.
Raised when an extra cannot be removed from this install.
Covers both "not selected on the tool requirement" and refusal subclasses. Callers distinguish them because only the base class is an idempot
Raised when an uninstall targets a required base-dependency extra.
A subclass so callers that only care about "cannot remove" can catch the base class, while the CLI and TUI can report a refusal sepa
Raised when a selected composite still supplies the requested extra.
Result of an attempted optional-extra install.
Result of an attempted optional-extra removal.
Validate shell commands against an allow-list without HITL interrupts.
When the agent invokes the execute shell tool, this middleware checks
the command against the configured allow-list **before e
Stock HITL routing with an async live-mode read after model completion.
The transient routing marker is added only to a shallow state copy passed directly into stock HITL routing. It is neither check
Transport cost receipts without caching JavaScript or forwarding state.
Displayable model capabilities with override provenance.
Provider presentation and readiness, without credential values.
Validated catalog from the environment that constructs models.
Rubric state carrying dcode's private runtime model selections.
These three channels are declared a second time here, because this
middleware's state_schema must list every channel it reads. Each
a
Nested-grader state used to scope verification-tool budgets.
Run a context-aware nested grader with CLI verification middleware.
The nested grader receives Deep Agents Code's verification middleware and runtime context without requiring those application-speci
A single choice option for a multiple choice or multi-select question.
A question to ask the user.
Request payload sent via interrupt when asking the user questions.
Trusted same-turn authorization recorded after an ask_user response.
Widget result when the user submits answers.
Widget result when the user cancels the prompt.
Path-safety and size limits for read-only repository inspection tools.
A single labeled diagnostic fact.
ok is False only for genuine problems (e.g. a missing dependency), not
for informational states such as an available update.
A named group of related diagnostic items.
tool.use hook payload (schema documented in hooks).
tool.error hook payload (schema documented in hooks).
tool.result hook payload (schema documented in hooks).
In-progress state for a single streamed tool call.
args and args_parts are two representations of the arguments used one at
a time, depending on whether the provider delivers the value whole or i
Counts of buffered tool calls that never emitted a tool.use.
A NamedTuple so callers can still unpack positionally while the field names
keep the two same-typed slots from being load-bearing at e
Token stats for a single model within a session.
Token and cost stats for one UsageKind bucket.
Usage returned after recording one streamed model message.
Stable identity of one model invocation in the usage ledger.
Message identity, optionally scoped to one model attempt.
Stats accumulated over a single agent turn (or full session).
What a stream consumer last recorded for one request.
Held so a later chunk of the same request can retract that exact contribution and re-record the running totals, keeping one API call to one reque
Declared context_schema for the agent graph.
Registered via context_schema= when the graph is built, so LangGraph
coerces each run's context= payload into this dataclass — in-process,
`runtime.
Client-facing builder for the per-run graph context payload.
Callers populate this and pass it via context= to astream/ainvoke.
ConfigurableModelMiddleware and the interrupt_on when predi
State for local context middleware.
Inject local context (git state, project structure, etc.) into the system prompt.
Runs a bash detection script via backend.execute() on first interaction
and stores that snapshot for stable system-
Suppress native stderr writes while the TUI owns the terminal.
Character set mode for TUI display.
Character glyphs for TUI display.
Mutable metadata for the model active in this process.
One complete generation of credentials and project context.
Stable owner of the active credential and project-context snapshot.
Reloads construct a complete immutable CredentialsSnapshot and publish it
with one reference assignment. Callers that need a cons
Why /trace found no LangSmith key, when an empty override is involved.
Distinguishes the three states the caller renders differently: a specific empty override is suppressing an available key (`sha
Offline snapshot of LangSmith tracing configuration for diagnostics.
Carries only presence/identity facts — never API keys or other secret
values — so it is safe to render in dcode doctor output.
Base class for typed LangSmith project URL lookup failures.
Concrete subclasses (LangSmithImportError, LangSmithLookupTimeoutError,
LangSmithApiError) let interactive callers like /trace show
The langsmith package is not installed.
The LangSmith project URL lookup exceeded its hard timeout.
The LangSmith SDK call raised — auth, 404, network, etc.
Wraps the underlying SDK exception in __cause__.
The LangSmith project does not exist yet (lookup returned 404).
Projects are created lazily on the first ingested trace, so this is expected before any run has flushed and should be surfaced as an in
Result of creating a chat model, bundling the model with its metadata.
This separates model creation from runtime-state mutation so callers can decide when to commit the metadata to process-wide stat
Deterministic chat model for integration tests.
This subclasses _ToolBindingFakeModel (itself a GenericFakeChatModel) so
the implementation stays aligned with the core fake-chat-model test surfac
Deterministic tool-calling model for auto-approve integration tests.
Generation is driven entirely by prompt markers (the module-level DCA_*
constants), so output is restart-safe and independent of
Exercise nested criteria generation with a repository read.
Structured version facts for a single installed distribution.
Separates three facts that are easily conflated: the live version read from the running source, whether imported or parsed (`source_versi
Network-free snapshot of the version facts diagnostics need.
Bundles the running CLI and installed SDK version facts with the result of
comparing the deepagents requirement that deepagents-code d
Raised when installed extras cannot be determined safely.
Install status for one optional dependency extra.
Resolved recovery action for a missing provider package.
Exactly one of three outcomes:
extra set, command None — prefer installing the extra that declares
the package (callers format thisA single tool's display metadata.
A named group of tools sharing a source.
An MCP server that was discovered but currently exposes no tools.
Everything dcode tools list needs to render, in display order.
Push the terminal title on start, update it, and pop it on restore.
Revert agent edits to the managed onboarding-name memory block.
Guards the managed onboarding-name block in a fixed set of memory files. A
write_file/edit_file that leaves the managed block untou
Classifier denial categories exposed to the agent and TUI.
One validated verdict bound by the server to its proposed tool call.
Server-assembled verdicts for one unresolved action batch.
One checkpointed classifier request and its validated response.
Bounded provider-neutral classifier history.
Server-owned denial and availability counters for one thread.
Checkpoint-safe disposition for one gated call.
Private checkpoint record joining model output to after-model routing.
Server-owned provenance for one exclusively allocated scratch file.
Reducer update that creates or removes one exact artifact record.
Agent state carrying private Auto decisions and scratch provenance.
Trusted metadata attached by the Textual client to a user message.
Server-resolved approval mode and trace-safe diagnostics.
Apply deterministic policy, classifier review, and HITL fallback.
Reject dynamically gated MCP calls when no approval UI exists.
Structured proposal returned by the criteria agent.
A new proposal or a rejection-based regeneration.
feedback/previous_criteria are only present on a rejection retry.
An amendment to an accepted goal; both extra fields are required.
Main-agent state carrying a criteria request until it is cleared.
This intentionally uses normal last-value state: earlier middleware can
consume an ephemeral channel before GoalCriteriaMiddleware
Private per-invocation state for the nested criteria agent.
Nested-grader state used to scope verification-tool budgets.
Run goal-criteria requests entirely inside the main server graph.
Recover failed connections and preserve actionable login errors.
Complete set of semantic colors for one theme variant.
Every field must be a 7-character hex color string (e.g., '#7AA2F7').
Metadata for a registered theme.
Structured log record retained by the in-memory debug buffer.
Logging handler retaining the most recent structured records in memory.
Retention is partitioned by level: each recognized level name (see
LOG_LEVELS) keeps its own bounded deque of capacity re
Discriminator for ConfigResolutionError reasons.
Only NO_CONFIG_FOUND maps to exit code 2 in the mcp login CLI
handlers (run_mcp_login, run_mcp_login_list); all other kinds map to
exit code
Structured error returned when a login target cannot be resolved.
Successful resolution of a merged MCP config for login.
Resolved server config plus enough context for error messages.
Unified parse result for dropped-path payload detection.
Track pasted images and videos in the current conversation.
Thread metadata returned by list_threads.
Classification that controls whether a command can skip the message queue.
A single slash-command definition.
A single autocomplete entry for the slash-command controller.
A persisted API key credential.
The type field is the discriminator that lets OAuthCredential (added
later) coexist in the same file without migration.
A persisted OAuth subscription credential.
Stub kept here so the StoredCredential discriminated union narrows
correctly today and the OAuth implementation lands as a pure addition.
No code path pro
Result of a credential write that may have warnings to surface.
Result of a credential delete that may have warnings to surface.
A delete rewrites the whole store, so it can hit the same chmod failures as
a write. warnings carries them symmetrically with `Write
Capture effective main-call context and answer tool-free side questions.
Register after middleware that modifies the model, prompt, or settings,
including extensions. ConfigurableModelMiddleware re
Canonical goal/rubric fields used for notices and fingerprints.
The three user-controlled text sections a goal-state notice can embed.
Named rather than a bare tuple[str | None, str | None, str | None]: all five
call sites unpack positionally and immediately re
Metadata extracted from a canonical goal-state notice.
OSC 9;4 progress states.
See https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences.
A dangerous Unicode character found in text.
Safety analysis output for a URL string.
A result may have safe=True with non-empty warnings when
informational warnings (e.g. punycode decoding) are present without
suspicious patterns.
Raised when the launch-time profile location cannot be resolved.
Covers an unsupported DEEPAGENTS_HOME value and a launch home that
cannot be determined or is itself unusable. It is a ValueError
One component in the context audit.
Structured context audit ready for presentation.
Paths whose contents belong to one user profile and trust root.
Paths owned by the installed tool rather than a selected profile.
Project-controlled paths derived from an explicit repository root.
Frozen launch-time profile and installation paths.
Whether a probed path exists, is absent, or could not be read.
A StrEnum so the value serializes directly to JSON without a custom
encoder.
Tool-approval policy selected for an interactive thread.
Stored approval-mode control payload.
Stored content for a collapsed paste.
The paste's numeric identifier is the key under which this record is stored in the input's paste map, so it is not duplicated on the record.
Merged view of built-in, entry-point, and config sandbox providers.
Snapshot of the ChatGPT OAuth login state.
Raised when the user cancels a sign-in flow mid-callback wait.
Raised when a stored ChatGPT token cannot be refreshed.
Distinct from a missing token (FileNotFoundError): a token exists on
disk but its refresh token was revoked or expired, so an automatic
refre
UI hooks for the browser loopback sign-in flow.
Implementations decide how to surface the authorize URL and whether to auto-open a browser. The Textual screen subclasses this; CLI / headless callers
How to install the package that provides a sandbox backend.
Built-in providers ship as deepagents-code extras (kind="extra");
third-party providers install as arbitrary packages (kind="package"
Static description of a sandbox provider used by the registry.
Lets the CLI and registry describe built-in and config providers without instantiating them (which may require credentials or optional d
Base error for sandbox provider operations.
Raised when the requested sandbox cannot be found.
Interface for creating and deleting sandbox backends.
Configuration for a single config-declared sandbox provider.
Setting class_path executes arbitrary Python code imported from the
user's config file. This has the same trust mod
Parsed [sandboxes] configuration from config.toml.
Instances are immutable once constructed; providers is wrapped in a
MappingProxyType to prevent accidental mutation.
Expose tools registered after the agent graph was built.
Registrations and isolated errors from one load pass.
Authorized sources and non-fatal resolution errors.
Default decision for project-authored extension code.
Effective extension configuration for one process.
Runtime mode exposed to extensions.
Factory-scoped registrar and read-only session context.
Each extension receives a dedicated instance, which attributes every registration to the extension's source without exposing mutable dcode appl
GitHub-hosted MCP: RFC 8628 Device Authorization Grant.
Outcome of a provider's pre-handshake run_login step.
Base class for provider-specific OAuth dispatch.
Subclasses override matches plus whichever of client_metadata
and run_login they customize. The default implementations cover
the spec-compliant
Fallback provider for spec-compliant MCP servers with no quirks.
Slack-hosted MCP: loopback Authorization Code with a public client.
Raised when a marketplace cannot be loaded.
Local directory or JSON file used as a marketplace source.
GitHub or Git repository used as a marketplace source.
ref selects an optional branch or tag. Commit SHA checkout is not part of
the shallow-clone flow.
Marketplace manifest downloaded from an HTTP URL.
Parsed plugin manifest.
Inventory of supported plugin components.
unsupported lists plugin component directories that deepagents-code does
not load (e.g. agents/, commands/).
A discovered plugin ready to feed dcode adapters.
A plugin stored relative to its marketplace.
A plugin sourced from a GitHub repository.
A plugin sourced from a subdirectory in a Git repository.
A plugin sourced from a Git repository URL.
A catalog entry from a marketplace manifest.
A parsed marketplace manifest.
Persisted marketplace source record.
Install record for a plugin.
version is the value declared by the plugin manifest, if any.
Result from plugin discovery.
Raised when a plugin manifest is malformed enough to skip the plugin.
Raised when existing plugin state cannot be safely modified.
Load namespaced plugin skills without extending the SDK source API.
Wraps the SDK SkillsMiddleware. Sources without a namespace load exactly
as the SDK loads them. Sources carrying a plugin namespa
Presentation total derived from the latest independent subtotals.
Retain each source independently so delayed updates cannot erase spend.
Raised when the HITL interrupt loop exceeds _MAX_HITL_ITERATIONS rounds.
A tool call whose tool.use has fired but whose result has not arrived.
Bundling the name and args into one record keeps them structurally in
lock-step: a single dict[str, InFlightToolCall] cannot
Mutable state accumulated while iterating over the agent stream.
Best-effort background LangSmith thread URL lookup state.
Thread safety: the background thread sets url then calls done.set().
Consumers must check done.is_set() before reading url.
Manages a langgraph dev server subprocess.
Focuses on subprocess lifecycle (start, stop, restart) and health checking. Env-var management for restarts (e.g. configuration changes requiring a full r
An option paired with its resolved effective value, for display.
Bundles the four values that always travel together through the render helpers as one named record, so they can't be reordered or misa
Adapt hook invocations and handler output across the wire boundary.
Persisted trust record for one canonical workspace root.
Versioned on-disk trust store for project-scoped hooks.
Decides whether project-scoped hooks may run in a given directory.
Trust is a property of the workspace, not of the session, so it must be re-resolved every time the working directory moves. A sessio
Live client identity projected into every hook invocation.
Result of a lifecycle hook that may halt the caller.
Result of UserPromptSubmit, including its prompt rewrites.
Owns the Hooks v2 runtime, presenter, hook service, and transcripts.
The presenter is the manager's, not the runtime's: one instance is created once and handed to every runtime the manager loads, so
One JSONL record in a materialized transcript projection.
Identity of a materialized transcript file.
Append-only JSONL transcript projections owned by the client process.
Collect completed stream messages into a Hooks transcript runtime.
Client-only materialization needed to build one hook wire envelope.
Client-owned session runtime around an immutable Hooks snapshot.
Owns configuration snapshot identity, transcript materialization, and the
HookEngine. Server-owned lifecycle events reach this runti
One ordered command handler in a configuration snapshot.
Matched handlers for one invocation.
Immutable, declaration-ordered Hooks v2 runtime configuration.
Origin of the matcher groups contributed by one hooks document.
A project or user hooks file, which defines no variables.
Origin and environment for groups one enabled plugin contributed.
Validated configuration plus load diagnostics and source paths.
Deduplicate hook fulfillment for one client session.
Execute Hooks v2 invocations against one immutable snapshot.
Client approval decision compatible with HITL resume payloads.
Normalized result shared by TUI and headless permission handling.
How one batch of gated tool calls was resolved by hooks.
Indices refer to positions in the originating action_requests list, so a
caller can line outcomes back up with its own UI rows.
Validated output and diagnostics from one command handler.
Raised when a client-owned hook stops lifecycle processing.
Client state required to create a domain hook invocation.
Execute client-owned events and apply their common side effects.
User-facing output goes through the runtime's presenter, which the owning
HooksManager also holds. The service never wraps or replac
Request sent for a server-owned hook invocation.
Response returned for a server-owned hook invocation.
Configuration for a synchronous command hook.
Currently only type: "command" is supported. Additional handler types
remain a discriminated-union extension point and are rejected until
implemented.
A matcher and its ordered hook handlers.
Top-level configuration grouped by hook event.
A tool.result payload held back until the authoritative result arrives.
Used for an answered ask_user: the middleware owns the final status, and the
hook body must be the sanitized summary rather
A validated rubric_evaluation_end event forwarded to the caller.
Bundling the two fields as named attributes (rather than two positional strings) makes the grading-run correlation self-documenting
Adapter for rendering agent output to Textual widgets.
This adapter provides an abstraction layer between the agent execution and the Textual UI, allowing streaming output to be rendered as widgets.
One prompt summary row.
Public so its Clicked message resolves to the idiomatic
on_prompt_row_clicked handler; nothing outside this module builds one.
Message sent when a prompt row is clicked.
Filter, preview, copy, or select a previously submitted prompt.
Keep the session cost warning visible until acknowledged.
Ask whether to start a new session or exit after a blocked resume.
Show a live, scrollable, copyable list of MCP server statuses.
How to resolve a cold prompt-cache warning.
Offer actions for a turn whose prompt cache may be cold.
Dismisses with the chosen ColdCacheChoice, or None on a
programmatic pop. Esc is mapped to CANCEL so the user is never
forced into a spe
Ask whether to compact a just-resumed thread before the next turn.
Side-question editor with the shared multiline and paste conventions.
Posted when Enter submits the complete side question.
Chat independently of the main run with restorable side exchanges.
Confirm a model switch that preserves a large conversation context.
Modal showing the copyable entire-thread token and cost breakdown.
Confirm or edit a suggested name without changing the thread yet.
Arrow-key navigable plugin manager for /plugins.
Closing runs the optional check_reload_required callback while this screen
stays mounted. Changed plugin state transitions in place to a reload pr
Posted when a plugin manager tab label is clicked.
Mouse-clickable tab label in the plugin manager header.
In-TUI first-run notice describing what Auto mode does.
Dismisses with True on Enter (confirm switch to Auto) and False on
Esc (cancel, stay in current mode). Programmatic dismiss may yield `None
The closed set of LangSmith region selections in the /auth prompt.
Outcome of resolving the region selector to an endpoint to persist.
endpoint is the canonical URL to store (empty for the US SaaS default);
error is a user-facing message when a Custom URL is mis
Outcome of an AuthPromptScreen interaction.
The three outcomes need to stay distinguishable because callers in the
recovery path retry the original failing operation only on SAVED —
retrying afte
Confirm before launching an authentication flow for a model.
A provider-agnostic gate shown when a selected model needs credentials that aren't detected, and starting the auth flow is disruptive enou
Confirmation overlay shown before clearing a stored credential.
Patterned on DeleteThreadConfirmScreen so the destructive prompt feels
consistent across the app. Always dismisses with True on con
Modal that captures and persists an API key for one provider.
Dismissal values are members of AuthResult so callers in the recovery
path can distinguish "user just saved a key — retry the failed
op
Modal that lists configured providers and lets the user manage keys.
Reachable via the /auth slash command. Always dismisses with None;
state changes are persisted by AuthPromptScreen and refle
Posted when a key prompt successfully persists credentials.
Carries the /auth config key that was saved so the app can react to
credentials that gate spawn-time behavior — e.g. a Tavily key that
en
Posted when a key prompt deletes stored credentials.
Carries the /auth config key that was deleted so the app can clear
any in-memory state derived from the now-removed credential.
Confirmation overlay for installing an arbitrary --package.
Dismisses with True when the user confirms and False when the user
cancels. Esc is treated as cancel so the user is never forced into
Confirmation overlay for installing a model provider's extra.
Shown from the model selector when the user picks a model whose provider
integration package is not installed. Dismisses with True to i
Modal asking whether to restart the server for a spawn-time change.
Serves both the post-install offer and the post-/auth web-search offer;
the caller supplies the title verb and body copy.
Di
A single row in the console's session snapshot.
The four named fields keep the display strings and their interaction metadata
explicit at construction sites. copyable opts a row into click-to-copy,
Modal showing a session snapshot and a live tail of recent log records.
Dismissal payload identifying which action the user picked.
The screen returns this via dismiss() when the user drills into
a notification and selects an action; it returns None when the
user can
Posted when a notification row is clicked with the mouse.
Posted when the user picks SUPPRESS from a notification's detail modal.
The center does not dismiss on SUPPRESS because the remaining notifications should still be reachable in place. The app handles
Posted when the user toggles the settings disclosure row.
The app responds by refreshing the open center's settings state from config; the center also handles the message itself so toggles stay respo
Posted for an action that opens a follow-up modal in place.
Some actions (those in IN_PLACE_ACTIONS, currently ENTER_API_KEY)
push another modal, such as the API-key prompt, on top of the
still-o
Shared hub for pending notifications and warning preferences.
Each PendingNotification is a single row followed by a settings
disclosure row. Up/Down (or j/k) moves the cursor; Enter or click drill
Base class for tool approval widgets.
Generic approval widget for unknown tools.
Approval widget for write_file - shows file content with syntax highlighting.
Approval widget for edit_file - shows clean diff with colors.
One startup tip displayed above the chat input.
Raised by MCPLoginScreen.action_cancel when the user cancels the flow.
Modal that renders the OAuth login flow and collects user input.
Implements the OAuthInteraction Protocol structurally so a
mcp_auth.login(..., ui=screen) call drives the same modal. Each
interac
Docked two-pane panel visualizing js_eval subagent fan-out by phase.
Hidden until the first spawn event. Phases (one per js_eval) list on the
left and the selected phase's subagents render as a s
Outcome of the YOLO first-enable notice.
ACKNOWLEDGE enables YOLO (and records the acknowledgement); MANUAL
switches to Manual instead; CANCEL keeps the previous mode. A
programmatic dismiss ma
In-TUI acknowledgement shown before unrestricted YOLO becomes active.
Dismisses with YoloModeNoticeResult.ACKNOWLEDGE on Enter (acknowledge and
enable), YoloModeNoticeResult.MANUAL on m (switch
Prompt filter with standard modified-Backspace word deletion.
Query field for the inline prompt search panel.
Plain Input apart from the class name, which lets ChatInput filter
Input.Changed / Input.Submitted messages down to this field, plus
bindings f
Posted on Escape or empty-query Backspace, to close the search.
One clickable prompt row in the inline search panel.
Message sent when a prompt row is clicked.
Inline prompt history search rendered above the input row.
Display-only: ChatInput owns the query, filtered snapshot, and
selection, drives key handling, and re-opens the modal tier. The panel
mirr
Message sent when the panel's rendered row count changes.
Message sent when a prompt row is clicked in the panel.
Modal asking whether to switch cwd when resuming or switching to a thread.
Ask how project hooks in a newly entered workspace should be trusted.
TextArea that detects paste-like keystroke bursts.
Subclasses drive the state machine from their own _on_key by calling the
helper methods here, and override the policy hooks
(`in_slash_command
Paste-aware text area that collapses large pastes into placeholders.
The full pasted text is stored off-screen in _pasted_contents and a
compact [Pasted text #N] placeholder is shown in its place
Keep the current goal and lifecycle state visible above the input.
Which stored preference Ctrl+S toggles, and how the footer names it.
The selector is reused for pickers that choose something other than the
main agent model (for example the /auto classifier), whe
A clickable model option in the selector.
Message sent when a model option is clicked.
Selector title whose current-model span copies on click.
Full-screen modal for model selection.
Displays available models grouped by provider with keyboard navigation and search filtering. Current model is highlighted.
Returns (model_spec, provider) tuple
Compact welcome banner shown at startup.
Renders a bordered box with the product title and optional version. A
(debug enabled) tag appears when DEEPAGENTS_CODE_DEBUG is enabled
(truthy), and an `
Manages command history with file persistence.
Uses append-only writes for concurrent safety. Multiple agents can safely write to the same history file without corruption.
Free-form answer input for ask-user questions.
Adds two behaviors over the shared base:
Posted when the user presses Enter to submit an ask-user answer.
Interactive widget for asking the user questions.
Supports text input, multiple choice (pick exactly one), and multi-select (toggle one or more) questions. Choice questions always include an "Other"
Message sent when user submits all answers.
Message sent when user cancels the ask_user prompt.
Ask before changing agents to resume a thread.
Run the ChatGPT OAuth Authorization Code Flow with PKCE inline.
Dismissal value:
True: a token was saved (caller should refresh provider lists /
retry the operation that needed the credentiaOutcome of the CodexSignedInScreen quick-action overlay.
Encoded as an enum (mirroring AuthResult) rather than bare strings so a
typo in either the producing action_* method or the consuming di
Quick-action overlay shown when openai_codex is already signed in.
Dismissal values:
CodexSignedInAction.SIGN_OUT: delete the stored token.CodexSignedInAction.REAUTH: open the OAuth flowStrategy for building a tool's HITL approval widget.
Each renderer maps a tool name to a (widget_class, data) pair that
controls what the user sees in the approval box. Tools not registered
in `_RE
Renderer for write_file tool - shows full file content.
Renderer for task tool — interrupt description provides full context.
Renderer for delete tool - shows removed file content when available.
Renderer for edit_file tool - shows unified diff.
Widget result when the generated criteria are accepted unchanged.
Widget result when the user submits revised criteria.
Widget result when the user rejects criteria with feedback.
Widget result when the user cancels the proposal.
Text input that keeps goal-review edit keystrokes inside the editor.
Posted when the user presses Enter to submit goal-review text.
Posted when Escape should leave goal criteria edit mode.
Inline review widget for generated goal acceptance criteria.
Message sent when the user accepts, edits, or cancels.
Captured stdout printed during a js_eval evaluation.
A successful js_eval evaluation result.
An error raised during a js_eval evaluation.
Return " (released Nd ago)" for version, or "" when unknown.
Record a validated provisional usage event from a nested model call.
Resolve the model spec the Auto approval classifier should use.
Return the project-level tool-agnostic .agents/skills directory.
Read a live approval mode from the server-side LangGraph Store.
Validate late routes and flag graph-bound registrations for restart.