What invoked AI surfaces do terminals and native-toolkit peers ship, how do they capture terminal context, how do they gate consent and agentic execution, and which of those surfaces fit DropTerm's existing seams?
Question: What invoked AI surfaces do terminals and native-toolkit peers ship (agent mode, chat pane, command generation, error explanation, embedded CLI agents), how do they capture terminal context, how do they gate consent and agentic execution, and which of those surfaces fit DropTerm's existing seams?
Date: 2026-11-26
TL;DR: Every AI surface the surveyed peers ship is an invoked one — agent modes, chat panes, explain/generate commands, and embedded CLI agents; none runs an LLM uninvoked on the typing path — and each gates its agentic power through layered consent (feature off-switches, per-category Ask/Always/Never grants, per-call approval with persist options, regex allow/deny lists under deny-wins precedence) while its context is bounded screen text, scrollback ranges, or tool-captured command output rather than raw PTY streams. For DropTerm the two one-shot surfaces its seams almost carry — exit-code-triggered error explanation and palette-driven command generation ending in send_text — are feasible now on top of the ai-completion-providers provider trait plus one new host ai verb and one bounded screen-capture verb; the chat pane and any in-app agent loop are the expensive tier every peer pays for with dedicated permission machinery, and DropTerm's pane already hosts the embedded CLI agents (Claude Code, Codex CLI, Gemini CLI, OpenCode, Copilot CLI) that peers ship as their own agent story.
Findings
Peer list: all eight named peers verified; nothing added or dropped. Amazon Q/Kiro and gh copilot were surveyed on the completion side by ai-completion-providers and are not repeated; kitty, Zellij, Hyper, and tmux were surveyed on the plugin side by terminal-plugin-systems and are not repeated.
1. Warp: Agent Mode is a real terminal-driving agent with a four-level autonomy ladder and regex command permissions
- Warp's built-in agent "works through multi-step tasks on its own, running commands in a real terminal"; it "runs shell commands, reads live output, and drives interactive programs like REPLs, database shells, and full-screen apps," and its Full Terminal Use capability means it "can see the live terminal buffer, write commands, respond to prompts" (Agents overview, agents text mirror, both fetched 2026-11-26).
- Approval is the default and the autonomy knob is explicit: "The agent asks before it runs commands, edits files, or calls MCP servers"; per-permission levels are "Agent Decides, Always ask, Always allow, Never" (agents text mirror, fetched 2026-11-26).
- Command permissions are regex lists: allowlist examples documented include
which .*,ls(\s.*)?,grep(\s.*)?; the denylist (wget,curl,rm,eval) "takes precedence over both the allowlist andAgent decides" (same source). The one documented auto-run tier, "Run until completion," auto-approves actions and "by default it also runs commands that match your command denylist" — the user must turn on a mode that overrides their own denylist (same source). - Agent Profiles bundle "autonomy level, base model, tool access, and command permissions" (same); consent is a feature off-switch: "You can disable Warp's AI features entirely in Settings > Agents > Warp Agent" (Agents overview, fetched 2026-11-26).
- Context is shared across surfaces: "Rules, Skills, MCP servers, and Codebase Context apply the same way in the app, the CLI, and the cloud"; codebase context is "semantic indexing of your Git-tracked files" with "No code is stored on Warp servers" (same source). The pages fetched do not itemize the per-request terminal payload (see Unverified).
- BYOK (re-verified this session): "Personal API keys are stored in your device's secure storage" and "Warp does not retain your personal API key" — but "BYOK prompts and responses pass through Warp's servers" (BYOK docs, fetched 2026-11-26). The client is AGPL ("the editor and terminal that host your agents are fully auditable" — Agents overview).
2. Warp also ships the agent as a standalone CLI and hosts third-party CLI agents — the embedded-agent pattern
- The
warpCLI runs "the same Warp Agent harness as the Warp app" inside any terminal: "a standalone terminal program" rendering "conversations as a scrolling transcript in your terminal, with streaming responses, code diffs, tool calls, and permission requests you approve inline"; approval cards can be automated via "execution profiles and auto-approve" (Warp agent CLI text mirror, fetched 2026-11-26). It is "a native terminal multiplexer" that keeps its own PTY and "works in any terminal emulator, including over SSH." - Third-party agents are a documented surface, not a plugin API: "Run Claude Code, Codex, OpenCode, and others inside Warp," with per-agent notification integrations (Claude Code plugin, Codex config.toml setting, OpenCode plugin) (agents text mirror, fetched 2026-11-26). Warp builds no permission machinery for these agents — each harness carries its own.
3. Wave: an AI pane with workspace tools whose terminal command execution has not shipped
- Wave's AI is a chat widget/pane: "Context-aware terminal assistant with access to terminal output, widgets, and filesystem" (Wave AI docs, fetched 2026-11-26 via the repo's
docs/docs/waveai.mdxat main). - Consent is a master toggle over workspace access: Widget Context ON — "AI can read terminal output, capture widget screenshots, access files/directories (with approval), navigate web widgets, and use custom widget tools"; OFF — "AI only sees your messages and attached files" (same source).
- The tool list under Widget Context: Terminal — "Read Terminal Output: Fetches scrollback from terminal widgets, supports line ranges"; File System — read with line ranges, list directories, and "Write Text Files (Create or modify files with diff preview and approval)", all "requiring approval"; "File system operations require explicit approval. You control all file access." Command execution is not shipped: under "Coming Soon," "Command Execution: Run terminal commands with approval" (same source). The one peer whose AI pane cannot yet act in the terminal it lives beside.
- Privacy: "Messages are proxied through the Wave Cloud AI service (powered by OpenAI's APIs)"; "Wave does not store your chats, attachments, or use them for training"; with local models "your chat data never leaves your machine" (same source). Provider/mode configuration is named modes over presets plus a full-URL custom endpoint in
waveai.json— the shape pinned by ai-completion-providers finding 4.
4. iTerm2: AI Chat with the richest per-category consent model of any surveyed terminal
- iTerm2's AI Chat "offers a chat window with a large language model that can optionally interact with iTerm2's windows" (AI Chat docs, fetched 2026-11-26). Every chat is one of three kinds: Unlinked ("no access to any of your sessions"), Linked to a session, or Orchestration ("can see all of your sessions and operate iTerm2 for you").
- Permissions are per-category, three-state, and rotate in the UI ("the order is Never -> Ask -> Always -> Never"; unchecked categories mean "always deny and the AI agent will not be offered functions related to those categories"). The categories, quoted from the same page:
- Check Terminal State — "the current directory, user shell, the current or last command and its exit status, the size of the terminal window, the host you are SSHed to (if any), and the current username."
- Run Commands — "functions available to AI that let it execute commands on your behalf."
- View Contents — "your command history, the output of an earlier command, the partially typed command line, and the visible screen"; when Always Allow, "the terminal's visible screen is attached to every message you send in this chat."
- Control Terminal — "send keystrokes to the terminal, erase the current command line, and restart the session."
- plus View Manpages, Write to the Clipboard, Write to the File System, Act in Web Browser.
- Reading and acting are separately gated, and orchestration pre-approval is revocable: "By default it may read the contents of any session, but it must ask permission before typing into one"; @-mentioning a target "pre-approves it," and "Each grant appears as a message with a Revoke button" (same source).
- The invoked explain surface exists as a first-class command: "When you select Edit > Explain Output with AI then a new chat is created and the session is automatically linked" (same source).
- Provider hygiene: chat pinned to its provider for life; a manual model editor with OpenAI-compatible presets "(Ollama, OpenRouter, z.ai, Qwen, and MiniMax)"; an "economy" model runs "cheap, frequent background jobs such as command-safety checks and screen-idle detection" (on-device Apple Intelligence an option); a Zero Data Retention toggle resends "the whole conversation with each message rather than referencing a previous response" (same source).
- Watches are an AI-invoked background read: "the AI, reading the session's screen in the background, decides the condition has been met" (same source) — the only surveyed surface that lets the model poll the screen uninvoked after a single consented ask.
5. iTerm2: no MCP server found — its AI capability reaches third parties only through the Python API
- The documentation index (documentation.html, fetched 2026-11-26) lists AI Chat and Claude Code Integration as the AI feature pages and has no MCP page;
documentation-mcp.htmldoes not exist (404, fetched 2026-11-26). Web searches surface only third-party MCP servers (e.g. ferrislucas/iterm-mcp) wrapping the official Python API. As of fetch, iTerm2 does not document a built-in MCP server (absence bounded by the docs index; see Unverified). - What ships instead: version 3.7 (released 2026-09-08) "adds … a Claude Code integration" (news, fetched 2026-11-26) — the page exists at
/claude-code-integration.htmlper the docs index, but its contents could not be fetched (rate-limited; see Unverified). Version 3.5 (2024) "introduced … ChatGPT integration" (same news page). The Python API remains the out-of-process extension surface (terminal-plugin-systems finding 6).
6. Zed: the GPUI sibling hosts three agent paths in one panel — native agent, ACP external agents, and terminal-backed threads
- "The Agent Panel is where you interact with AI agents that can read, write, and run code in your project" (Agent Panel docs, fetched 2026-11-26). The three paths (AI docs index, fetched 2026-11-26): the first-party Zed Agent (default), External Agents ("ACP-integrated agents"), and Terminal Threads.
- The native agent's tools: "Zed includes built-in tools for searching your codebase, editing files, running terminal commands, and more"; context is explicit, not ambient — "@-mention files, directories, symbols, previous threads, skills, diagnostics, branch diffs, and URLs to fetch," and terminal output enters only by selection ("agent: add selection to thread") or paste (Agent Panel docs, fetched 2026-11-26). Rating a response "sends the conversation thread to Zed"; "If you don't want data persisted on Zed's servers, don't rate."
- Native-agent permissions are a regex ladder in settings (
agent.tool_permissions, replacing the pre-0.224.0agent.always_allow_tool_actionsboolean): fallback default"confirm"(else"allow"/"deny"), pattern rules ordered "built-in security rules,always_deny,always_confirm,always_allow, per-tooldefault, then the global default";always_denyis "highest priority, cannot be overridden"; built-in hard rules block "recursive deletion of critical directories" (rm -rf /,rm -rf ~) and "cannot be overridden by any setting"; MCP tools are keyedmcp:<server>:<tool_name>(Tool Permissions docs, fetched 2026-11-26). The prompt UI offers "Allow once / Deny once — One-time decision" plus "Always for <tool>" and "Always for <pattern>"; "Skills invoked explicitly via slash commands skip prompting because the user already chose them" (same source). - External Agents run "through their own process and provider relationship" over ACP: the agent "usually owns its own runtime, auth, model selection, tools, and native configuration," keys do not transfer ("An Anthropic API key configured for Zed Agent does not automatically configure Claude Agent"), and billing/retention are "between you and the agent provider" (External Agents docs, fetched 2026-11-26).
- Terminal Threads are "terminal-backed threads in the Agent Panel … for when you want to run an agent CLI or TUI directly in Zed"; the CLI owns everything ("tool configuration … authentication … model/provider configuration"), and crucially "Zed Agent tool permissions … do not automatically apply to Terminal Threads" (Terminal Threads docs, fetched 2026-11-26). Zed's only terminal touch is UI plumbing: a bell notifies, and title updates (e.g. Codex's
tui.terminal_titlefields) label the sidebar entry. This is the editor's answer to embedded CLI agents — a terminal DropTerm already is.
7. Tabby, WezTerm, Alacritty: no AI surfaces ship
- Tabby's plugin API documentation (docs.tabby.sh, fetched 2026-11-26) documents no AI feature — no AI chat, completion, or suggestion page exists; the word "AI" does not appear in the API reference. AI reaches Tabby only through third-party plugins and MCP community servers (search census, 2026-11-26).
- WezTerm's documentation carries no AI/LLM/copilot page anywhere (wezterm.org, fetched 2026-11-26); its Lua config/plugin surface — the blueprint DropTerm's Lua host copied — is its entire extensibility, and it grows no AI verb (
wezterm.*Lua API surveyed 2026-11-21 by terminal-plugin-systems). - Alacritty's README states the philosophy that explains the absence: "integrating with other applications, rather than reimplementing their functionality"; "you won't find things like tabs or splits" (README on master, fetched 2026-11-26). No AI feature is mentioned anywhere in it.
8. Ghostty: no AI in the product; AI is a development tool with a review discipline
- No AI feature, option, or integration appears in Ghostty's documentation or its maintainer's scripting discussion (terminal-plugin-systems findings 6, fetched 2026-11-21; re-checked this session).
- Hashimoto's public AI engagement is about building Ghostty with agents, not shipping AI in it: "Vibing a Non-Trivial Ghostty Feature" (2025-10-11) walks through developing the macOS auto-update feature with agentic coding tools, with the discipline stated outright: "Please don't ever ship AI-written code without a thorough manual review" and "I'm not shipping code I don't understand" (mitchellh.com/writing/non-trivial-vibing, fetched 2026-11-26); "My AI Adoption Journey" (2026-02-05) extends the development-tool framing (writing index, fetched 2026-11-26).
9. The embedded CLI agents: the product shape an in-app AI has to beat
All five live inside a terminal pane today; they are the baseline because any terminal — DropTerm included — already runs them with zero code.
- Claude Code — "an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools"; the terminal REPL is the primary surface,
CLAUDE.md"reads at the start of every session" (AGENTS.md accepted in its place), MCP client built in (Overview, fetched 2026-11-26). Permissions are the deepest surveyed: modes default ("Prompts before most edits, shell commands, and network requests"), acceptEdits, plan, auto ("Runs without routine prompts" with a background classifier), dontAsk, and bypassPermissions (warned "in isolated environments like containers or VMs"); allow/ask/deny rules evaluated "in order: deny, then ask, then allow"; "Yes, and don't ask again" persists "Permanently per repository and command" into.claude/settings.local.json; the docs admit a text deny rule "isn't a security boundary — it doesn't match the same program invoked in a different form," and that "Instructions in your prompt orCLAUDE.mdshape what Claude tries to do, but they don't change these rules" (IAM/permissions, fetched 2026-11-26). - Codex CLI — "Inspect code, make changes, run commands, and automate repeatable work without leaving your terminal";
/permissionsto "choose what Codex is allowed to do," with the "active sandbox and writable roots" inspectable;codex mcpadds servers whose tools you can "inspect … before Codex uses them"; non-interactivecodex execfor pipelines (CLI docs, fetched 2026-11-26; note: developers.openai.com 308-redirects there). - Gemini CLI — "An open-source AI agent that brings the power of Gemini directly into your terminal" (Apache-2.0); tools for file operations, shell commands, web fetch; "Sandboxing & Security — Safe execution environments" and "Trusted Folders — Control execution policies by folder"; checkpointing;
GEMINI.mdcontext files; MCP client and server (GitHub README, main, fetched 2026-11-26; the free tier now points to Antigravity CLI as of 2026-06-18). - OpenCode — "an open source coding agent. It's available as a terminal-based interface, desktop app, or web app"; provider-agnostic (
/connectin the TUI), MCP servers, plugins, custom commands (docs, fetched 2026-11-26; its per-tool permission model was not on the fetched page, see Unverified). - GitHub Copilot CLI — a standalone agentic CLI: "Copilot asks for your approval when a tool request isn't already allowed," with approve-once/approve-for-session/reject-with-feedback;
--allow-tool/--deny-toolflags with deny precedence; the auto-approval warning is explicit — "Copilot has the same access as you do to files on your computer, and can run any shell commands that you can run"; an "assisted" permission mode "use[s] an LLM to auto-approve requests it judges to be safe"; trusted directories gate file access; MCP client and ACP server both (About Copilot CLI, fetched 2026-11-26).
10. Cross-cutting: context capture is bounded screen text, ranged scrollback, or tool results — never raw PTY streams
- Screen/scrollback as the context: Warp's Full Terminal Use gives the agent "the live terminal buffer" (agents mirror, fetched 2026-11-26); iTerm2 attaches "the visible screen … to every message" under Always Allow with history tools "available on request" (AI Chat); Wave's AI tool fetches "scrollback from terminal widgets, supports line ranges" (waveai.mdx).
- Shell-integration-derived state: iTerm2's Check Terminal State exposes "the current directory … the current or last command and its exit status" — the same fact class DropTerm's status ctx already gathers (
cwd,reported_cwdfrom OSC 7,exit_status; then-status-segments). - Tool results instead of the screen: the CLI agents never scrape; they run commands as tools and consume the output as tool results (inference from their documented shape — pipes (
tail -200 app.log | claude -p) and "inspect commands and diffs as they appear" — not from a stated anti-scraping policy). Zed likewise: terminal output enters the thread only by explicit selection (Agent Panel). - The rule that falls out: every peer bounds what leaves the machine to a named, human-meaningful slice (visible screen, line-ranged scrollback, last command plus exit status) and obtains it either from the emulator's own grid or from shell-integration state — the two things DropTerm owns (inference, but grounded in every citation above).
11. Cross-cutting: consent is layered, and the permission gate is the prompt-injection defense
- Four consent layers recur across peers, in increasing strength: (1) a feature off-switch (Warp's disable-AI; Wave's Widget Context toggle; DropTerm's own off-by-default AI source per ai-completion-providers); (2) per-category capability grants with Ask/Always/Never (iTerm2's eight categories; Zed's per-tool patterns); (3) per-call approval with persist options (Zed's "Allow once / Always for <tool>"; Claude Code's "Yes, and don't ask again"; Copilot CLI's approve-once/session); (4) auto-run tiers that always name their override explicitly (Warp's "Run until completion" that by default still runs denylisted commands; Claude Code's bypassPermissions container warning; Copilot CLI's same-access-as-you warning).
- Deny-wins is universal where regex rule lists exist: Warp's denylist "takes precedence over both the allowlist and
Agent decides"; Claude Code evaluates "deny, then ask, then allow"; Copilot CLI's--deny-tool"takes precedence over the--allow-all-toolsand--allow-tooloptions." - Prompt injection through terminal output: none of the fetched primary sources documents an explicit technical defense against instructions embedded in the terminal content the model reads. The documented defenses are structural: capability gating (iTerm2 denies whole function categories), deny-wins rule lists, application-enforced rules ("they don't change these rules" — Claude Code), and OS sandboxing recommended as the complement (Claude Code's docs; Codex's writable roots). Record this as the survey's honest finding: the gate is the defense, and every peer that lets AI act keeps the act behind a prompt or a named policy (inference drawn from the cited pages; no peer page uses the words "prompt injection" in what was fetched).
12. Cross-cutting: the host-provided AI precedents — VS Code's Language Model API and the browser Prompt API
- VS Code, consuming host models (
vscode.lm): an extension selects from the host's roster withselectChatModels({ vendor, id, family, version }); consent is explicit — "Copilot's language models require consent from the user before an extension can use them. Consent is implemented as an authentication dialog," and "selectChatModels should be called as part of a user-initiated action, such as a command"; failures are typed —LanguageModelErrordistinguishes "model does not exist / user consent not given / quota limits were exceeded" — and "Extensions should responsibly use the language model and be aware of rate limiting" (Language Model API guide, fetched 2026-11-26). The extension never touches credentials; auth and quota belong to the host's platform (inference from the API's shape — the guide never states custody outright). - VS Code, contributing models (
LanguageModelChatProvider, 2025+): the reverse direction — "The Language Model Chat Provider API enables you to contribute your own language models to chat in Visual Studio Code"; the provider is responsible for "Discovering and preparing available language models, Handling chat requests for its models, Providing token counting functionality"; it is declared inpackage.jsonundercontributes.languageModelChatProviderswith "a unique vendor ID and a displayName," and the extension "implement[s] the logic for managing the provider such as configuring API keys or other settings" — keys are the contributing extension's burden, withoptions.silent"controll[ing] whether to prompt the user for credentials" and an enterprise policy able to "disable the Bring Your Own Language Model Key policy" (Language Model Chat Provider guide, fetched 2026-11-26). So VS Code ships both directions: extensions consume host-held-key models behind consent, or contribute key-holding providers into the same picker. - Chrome's built-in Prompt API (
LanguageModel): the host ships the model itself — "The Prompt API uses the Gemini Nano model in Chrome"; "the model is downloaded separately the first time an origin uses the API"; "No data is sent to Google or any third party when using the model." Access is capability-gated and activation-gated:LanguageModel.availability()probes readiness, "check for user activation. Then, call the create() function,"prompt()/promptStreaming()exchange prompts for text, quota errors carryrequested/contextWindow(Prompt API docs, fetched 2026-11-26; Chrome 148 web, 138 extensions). - The common precedent for DropTerm: a host holds model access (keys, transport, quota) behind a user consent gate, and extensions call a small typed surface to use it — never the other way around. This is exactly the seam ai-completion-providers already proposed engine-side (the
AiSuggestionProvidertrait); the new observation is that the same trait can serve script callers, with the browser's user-activation framing mapping onto DropTerm's always-invoked surfaces.
What DropTerm has today
Verified in the working tree at a83fb8f (branch ced, 2026-11-26) and the docs it pins:
- The plugin runtime (plugins;
dropterm/src/core/lua_host.rsmodule doc, lines 1-50): one dedicated host thread owning one mlua (vendored Lua 5.4) interpreter,std::sync::mpscboth ways, no tokio channel crossing the bridge; full stdlib, full-trust model "stated plainly"; soft 100 ms / hard 1 s instruction-count bounds via a debug hook, with the C-call and self-spawned-coroutine gap documented; hot reload recreates the interpreter whole, so no Lua-held state survives a reload. - The script surface (plugins):
on/emitbus; seven terminal events (bell,title,title-reset,child-exitwithcode,exit,focus-gained,focus-lost);status_segment,tab_title,command(name, description, handler)with palette and keybind rows,send_textas v1's one host verb; typed answers (styled spans) for every slot;dialog(modal, closed keyset, one to three buttons, presses return asslot-eventwithsurface/slot/element_id/kind);panel_viewdocking display-and-click-only views into the right rail ("the terminal keeps the keyboard while the rail stands"). - What scripts can see of the terminal (then-
status-segments): the status ctx carries scalar facts the band already gathered —cwd,reported_cwd(OSC 7),hostname,shell,branch,grid,exit_status,foreground,ssh_destination,running_elapsed, and more — but no terminal output text; "no engine state is read on a script's behalf." - The UI seams: command palette over app verbs plus script commands (command-palette); the Settings window with nine pages, one rendering manifest settings rows (the deleted 2026-11-23 settings-window record, plugins); the dialog slot; the right rail (panel containers).
- The build graph (
dropterm/Cargo.tomllines 76-90;Cargo.lockline 2595): tokio (rt-multi-thread, sync) beside the render loop; zbus 5.19; futures 0.3;gpui-pre-http-client0.3.12 present in the lock; no direct HTTP-client, keyring, or secret-service dependency inCargo.toml. - Owned prior verdicts this record builds on: tiered Lua-first plugins (terminal-plugin-systems); no LLM on the ghost-text path, an engine-side provider trait,
{provider, model}selection, keys out of config, AI off by default (ai-completion-providers); typed slots and activation/lifecycle incorporation order (vscode-typed-slots-rea, vscode-extension-lifecycle-rea) — whose incorporation list already names "quick-pick/input kinds on the existing dialogs slot."
Fit to DropTerm's seams
A candidate mapping — not a verdict; the owner rules. Cost drivers are what each surface demands beyond what exists.
| Peer surface | DropTerm seam | Candidate mapping | Cost driver |
|---|---|---|---|
Command generation (Warp Agent Mode's everyday use; gh copilot suggest's successor shape) | script commands + palette (exist), dialog slot (exists), send_text (exists) | A plugin command (palette-searchable today) opens an input dialog for the ask, renders the generated command as a styled dialog body with Insert / Copy / Dismiss buttons, and Insert calls send_text — the user's Enter executes, which is the consent gate | An input kind on the dialog slot (free text) — already named in vscode-extension-lifecycle-rea's incorporation order; the ai verb below |
Error explanation (iTerm2's "Explain Output with AI"; gh copilot explain's old shape) | child-exit {tab, code} event (exists), dialog (exists) | On a nonzero child-exit, a plugin surfaces a one-press dialog ("Explain this failure?") or a status-band chip; the answer renders as styled dialog body, optional suggested fix inserted via send_text | The ai verb; bounded context capture (below) so the model sees the failed command's output rather than only its exit code |
| Plain AI ask (one-shot Q&A) | script command + palette + dialog (all exist) | The same input-dialog + styled-answer flow with no terminal context | The ai verb only — the cheapest surface |
| Chat pane (Wave's pane, iTerm2's AI Chat window/inline panel, Zed's Agent Panel) | panel_view right rail is display+click-only by design; dialogs are one-shot | Two candidate hosts: an input slot on the rail (conflicts with "the terminal keeps the keyboard while the rail stands" — a focus-routing change on a layer surface) or a separate window (the settings-window precedent) | Highest cost of the set: input contract, keyboard routing, streaming display (typed answers are snapshot-shaped), and conversation state that survives interpreter reloads (hot reload and the hard cap both recreate the interpreter whole — Lua cannot hold chat history) |
| Embedded CLI agents (Warp's "Run Claude Code, Codex, OpenCode inside Warp"; Zed's Terminal Threads) | the pane itself | Nothing to build — DropTerm is the terminal those agents run in; this is DropTerm's agent story for free, and the baseline any in-app AI must beat | Zero |
Agent loop with in-app permission machinery (Warp Agent Profiles, Zed tool_permissions, Claude Code modes) | nothing — no in-app agent exists | Not a v1 surface; peers built it because they ship a first-party agent, and each treats the CLI agents' own permission systems as sufficient for embedded agents | The most expensive machinery in the survey (regex rule engines, approval cards, profiles, classifiers) with no first-party agent to gate |
Host AI exposed to plugins (VS Code vscode.lm precedent) | the mpsc bridge + bus (exist); the provider trait is proposed, not built (ai-completion-providers) | dropterm.ai.request{...} as a host verb: Lua calls it, the host performs HTTP (keys never reach Lua, deadlines are host-side), and the answer returns as a new bus event (ai-answer), the slot-event pattern's async shape — a handler never blocks seconds inside the 100 ms soft bound | One bridge verb + one event; consent = the AI off-by-default toggle (the manifest gains no capability vocabulary at v1; the full-trust model means a plugin can already exfiltrate anything it can read, so an AI grant adds no new hazard class — stated plainly, owner may still want a per-plugin grant later, the Zellij/VS Code capability precedent) |
| Terminal context capture (iTerm2's per-message visible screen; Wave's ranged scrollback) | nothing today — the seven events and the status ctx carry no output text | A bounded host verb (dropterm.screen(tab) for the visible screen; scrollback ranges a later tier), computed engine-side from the grid; the OSC 133 marks DropTerm's forks already pass through (architecture) could delimit the last command's output | Spike first: text extraction from the alacritty_terminal grid, output delimitation from the prompt marks, and the size bound; nothing script-facing exists here |
Recommendation
Proposed (awaiting the owner's ruling): v1 invoked AI = three one-shot, plugin-served surfaces — error explanation off child-exit, palette-driven command generation ending in send_text, and a plain AI ask — all running on a new host ai verb built over the ai-completion-providers provider trait, with bounded screen capture spiked before commitment; no chat pane, no in-app agent loop, no auto-execution tier at v1.
- Serve AI from the host, call it from scripts. The provider trait the completion record proposed lives engine-side regardless; expose it to Lua as one async verb + one bus event (
requestin,ai-answerout), never as a blocking call — the bridge and the slot-event pattern already pin this shape, and keys, transport, and deadlines stay host-side per the VS Codevscode.lmdivision of labor. The AI-off-by-default toggle is the consent gate, the browser Prompt API's user-activation framing in app form: every surface built on it is invoked by a press. - Keep the execution gate human. Generated commands reach the pane only through
send_text; the user's Enter runs them. No verb inserts and executes, no "Run until completion" tier, no agent loop: the surveyed peers gate exactly this hardest, and DropTerm's pane already hosts the agents that do agentic execution with their own permission systems (Warp and Zed both ship embedded CLI agents rather than growing their own harnesses for them). - Spike context capture before promising error explanation. The
child-exitflow is only as good as the failed command's output the model can see; that text does not exist on any script-facing seam today. Spike the engine-side extraction (grid text, OSC 133 output delimitation, size bound) and let the result rule whether v1 explains from output or from exit code plus cwd alone. - Defer the chat pane; record the two host options. The rail is display-only by an owner-ruled design (the terminal keeps the keyboard), and no Lua state survives a reload; a chat needs an input contract, focus routing, streaming display, and host-held conversation state. If demand appears after the one-shot surfaces, a separate window (settings precedent) beats a rail input slot on cost; the rail-claims-the-keyboard path is the one to re-examine then, not now.
- Grow the plugin manifest nothing at v1. The dialog input kind is the only vocabulary addition (already proposed in vscode-extension-lifecycle-rea's incorporation order); AI access rides the global toggle, with a per-plugin capability grant named as the later tier if third-party plugins ever proliferate (the Zellij/VS Code capability precedent).
Rejected alternatives:
- An in-app agent loop with approval machinery. Every surveyed permission machine (Warp Agent Profiles, Zed
tool_permissions, Claude Code modes, Copilot CLI's assisted mode) exists to gate a first-party agent; DropTerm would build the most expensive subsystem in the survey to duplicate whatclaude/codex/gemini/opencodealready do inside any pane, with their own maintained permission systems. - Streaming chat in the right rail at v1. Display-and-click-only is the rail's ruled design; claiming the keyboard there is a layer-surface focus-routing change justified by no surveyed one-shot surface, and Lua-held chat history dies at every reload.
- Scripts performing AI HTTP themselves. Full-trust Lua can already
io-read anything, so the trust model permits it — but keys would land in scripts and the 1 s hard cap would sever every request; the host-side verb is the only shape both the bridge and the timeout machine support, and it matches every peer's key custody. - AI ghost text on the keystroke path. Already ruled by ai-completion-providers (no peer ships it; the one that did removed it); this record's survey re-confirms it from the invoked side — every AI surface here starts with a user action.
- An MCP client in DropTerm's process as the AI answer. Protocol mechanics are owned by agent-protocols-mcp-acp-skills; nothing in this survey's evidence needs an MCP client to deliver the three one-shot surfaces.
Feasibility
Work items (coarse; units are modules/files/steps, not time):
- Host
aiverb +ai-answerbus event — one module beside the Lua host bridge consuming the provider trait from the ai-completion-providers recommendation (that record's transport and secret work is owned by ai-provider-transport-and-secrets). Roughly: one core module, one bridge command pair, one event arm, tests; one docs section indocs/plugins.md. - Input kind on the dialog slot — grows the dialog spec additively per the typed-slots/declarative-ui precedents: one core module extension, one shell-side rendering arm, tests; docs row in
docs/plugins.md's dialog table. - Context capture spike — headless: engine-side visible-screen text extraction from the grid, OSC 133-based last-command-output delimitation, a size bound; a written spike result before the verb's spec. Then, if GO: one core module + one host verb + tests + docs.
- Three plugin surfaces — explain-error, command-generation, plain-ask: one plugin each (small), exercising the seams above; the authoring/creator experience for them is owned by plugin-authoring-and-creator-ux.
- Settings AI page — one page on the settings window: the off-by-default toggle, the
{provider, model}pair from the completion record's recommendation; one module row + tests.
Hard blockers: none found. The D-Bus fire-and-forget seam is not on this path; the C-call interruption gap is irrelevant once HTTP lives host-side; the interpreter-reload statelessness only rules out Lua-held chat history, which v1 has none of.
Needs a spike before commitment: the context-capture verb (grid text extraction and output delimitation are engine internals no plugin-facing contract has ever touched); secondarily, whether an ai-answer event's arrival pacing interacts badly with the stale-dispatch machinery (expected fine — it is one more bus event — but it has never carried a multi-second-latency payload).
Sources
Primary sources; all fetched 2026-11-26 unless noted. Repos pinned by latest-main commit at fetch time where a pin exists.
- Warp (closed source; official docs and their text mirrors):
- Agents overview — surfaces inventory, disable-AI toggle, AGPL note, SOC 2/ZDR framing.
- Agents text mirror — Agent Mode capabilities, Full Terminal Use, autonomy levels, allow/deny regex lists, Run-until-completion, Agent Profiles, shared context, embedded CLI agents.
- Warp agent CLI text mirror — the
warpstandalone CLI: inline approval cards, execution profiles, settings paths. - BYOK — keyed providers, custom OpenAI-compatible endpoint, secure storage, server pass-through (also fetched 2026-11-23 for ai-completion-providers).
- Wave Terminal — repo
wavetermdev/waveterm, docs at main (prior pin9f1c9670d407, 2026-10-05):- Wave AI docs and its source
docs/docs/waveai.mdx— widget context toggle, tool list, command-execution "Coming Soon", privacy statements. - Wave AI modes (fetched 2026-11-23 for the sibling record) —
waveai.jsonmode schema, cited here only via that record.
- Wave AI docs and its source
- iTerm2:
- AI Chat — chat kinds, the eight permission categories, Never/Ask/Always rotation, Explain Output, Watches, economy model, provider presets, ZDR.
- Documentation index — the AI/scripting page census (no MCP page).
- News — 3.7 (2026-09-08) Claude Code integration; 3.5 (2024) ChatGPT integration.
- Python API — the out-of-process extension surface (surveyed 2026-11-21 by terminal-plugin-systems).
- Zed — repo
zed-industries/zed, docs site:- AI docs index — the three-agent-path map.
- Agent Panel — tools, @-mention context, selection-to-thread, rating-data framing.
- Tool Permissions — the
agent.tool_permissionsladder, built-in hard rules, persist options, slash-command skills exemption. - Terminal Threads and External Agents — the CLI-owns-it boundary, key non-transfer.
- Tabby: docs.tabby.sh — API reference with no AI surface (fetched 2026-11-26).
- WezTerm: wezterm.org — site/docs census, no AI pages (fetched 2026-11-26); Lua API surveyed 2026-11-21 by terminal-plugin-systems.
- Alacritty: README on master — goals/philosophy, no AI.
- Ghostty: mitchellh.com/writing/non-trivial-vibing and the writing index — AI-as-development-tool framing, review discipline; product-side absence per terminal-plugin-systems.
- Claude Code: Overview and IAM/permissions — product shape, CLAUDE.md, MCP, permission modes, deny-then-ask-then-allow rules, security-boundary admissions.
- Codex CLI: CLI docs (developers.openai.com 308-redirects here) —
/permissions, sandbox/writable roots,codex mcp,codex exec. - Gemini CLI: google-gemini/gemini-cli README, main — product shape, tools, sandboxing/trusted folders, GEMINI.md, MCP.
- OpenCode: opencode.ai/docs — product shape,
/connect, MCP, plugins. - GitHub Copilot CLI: About Copilot CLI — approval model, tool flags, assisted mode, trusted directories, MCP/ACP.
- VS Code: Language Model API guide (canonical path per docs:
/api/extension-guides/ai/language-model) and Language Model Chat Provider guide — consent dialog, typed errors, quotas; provider contribution, vendor IDs, extension-held keys. - Chrome: Prompt API docs — Gemini Nano, download gating, availability/activation, prompt/streaming, quota errors.
- DropTerm (local, HEAD
a83fb8f, 2026-11-26):docs/plugins.md,docs/status-segments.md,docs/architecture.md,dropterm/src/core/lua_host.rs(module doc),dropterm/Cargo.toml,Cargo.lock; records terminal-plugin-systems, ai-completion-providers, vscode-typed-slots-rea, vscode-extension-lifecycle-rea, the deleted settings-window record, command-palette.
Unverified
- iTerm2 MCP server absence: the documentation index has no MCP page and
documentation-mcp.htmlis a 404, and web search surfaces only third-party MCP servers built on the Python API — but the 3.6.x/3.7 changelogs on the downloads page were not read directly (rate-limited), so "no built-in MCP server" is absence-from-docs-index, not an exhaustive changelog sweep. - iTerm2 Claude Code integration contents: the page exists at
/claude-code-integration.htmlper the docs index, but every fetch of it was rate-limited; what the integration does is unknown from primary sources. - Zed rules-file precedence (
.rulesabove.cursorrules/.windsurfrulesaboveAGENTS.md, nearest-directory wins): sourced from web search results plus community discussion #36560; the official rules docs page could not be located (candidate URLs 404'd), so the precedence order is not pinned to a fetched primary page. - Ghostty AI-contribution disclosure policy: search results describe mandatory AI-use disclosure for contributors, but no fetched primary page states a formal policy; only Hashimoto's personal review discipline is pinned ("Please don't ever ship AI-written code without a thorough manual review").
- Warp's per-request context payload (exactly which terminal state each agent request sends) is not itemized on any fetched Warp page; only the shared-context categories (Rules, Skills, MCP, Codebase Context) and Full Terminal Use are documented.
- VS Code key custody ("the extension never sees the key"): inferred from the API's shape and the consent/quota framing; no fetched sentence states it outright.
- OpenCode's per-tool permission model (ask/allow/deny, external-directory protection): named by prior knowledge and search, not present on the fetched docs page; only the product shape is cited.
- Codex CLI's historical mode names (suggest/auto-edit/full-auto): current docs use
/permissionsplus sandbox/writable roots; the historical names were not verified against a primary source this session. - Wave's "Claude Code Integration" docs page (listed in the docs nav) was not fetched; its contents are unknown.
- CLI-agent anti-scraping framing: that Claude Code/Codex/Gemini/Copilot CLI consume tool results rather than scraping the screen is an inference from their documented shapes (pipes, transcript-visible commands), not from any stated policy.
- No fetched page contained instructions addressed to AI agents; the Warp docs'
llms.txtretrieval-endpoint suggestions are ordinary docs tooling and were treated as data.