Documentation menu

Documentation

Ask and chat

One-shot questions and interactive chat from a shell.

On this page

Overview

tde ask and tde chat put a TDE agent in your shell. ask answers once and exits; chat opens a persisted conversation you can leave and resume later. Both use the agents you already configured — same identity, same model, same skills, same instructions — and both reach My Loop through the same semantic Runtime API the deterministic CLI uses.

bash
tde ask "What is blocking task 41?" --project tde
tde chat --project tde

The defining property of these two commands is that the agent is read-only except through TDE. It can look at your checkout. It cannot edit a file, delete anything, commit, run a shell, or invoke a mutating project command. Every change it is allowed to make goes through the TDE Control MCP server — creating a task, running one, cancelling, retrying, reading the board.

Commands

text
tde ask PROMPT [--agent NAME] [--model NAME] [--project NAME]
tde chat [--agent NAME] [--model NAME] [--project NAME] [--session ID]
OptionApplies toMeaning
--agent NAMEbothWhich configured agent to use. Defaults to the agent named Default.
--model NAMEbothOverride the agent's model for this conversation.
--project NAMEbothWhich project — and therefore which checkout — the agent works against.
--session IDchatResume a previously persisted chat session.

ask takes exactly one positional prompt; quote it. A second bare word is an unexpected-argument error, and chat takes no positional arguments at all.

An agent name that does not exist fails fast with agent_not_found and exit code 4, before any provider process is started.

What the agent may and may not do

CapabilityAvailable
Read the selected project checkoutYes
Create, inspect, run, watch, cancel and retry tasksYes, through Control MCP
List projects, pipelines and agentsYes, through Control MCP
Read a redacted Web Share statusYes
Edit, delete or commit filesNo
Run a shell or a mutating project commandNo
Approve or reject a human gateNo
Start or stop Web ShareNo

Per-provider read-only adapters

TDE does not substitute providers behind your back. If you selected a Cursor agent, Cursor runs. What TDE does is wrap each official CLI in a provider-specific, test-pinned read-only adapter before the turn starts:

ProviderAdapter
Claude CodeEmpty setting sources, Plan permissions, an explicit built-in-tool allowlist, edit tools denied, and --strict-mcp-config carrying only TDE Control.
Codexexec --sandbox read-only --ignore-user-config --ignore-rules, with only the explicit TDE Control MCP injected on the command line.
Cursor--mode ask --sandbox enabled, run in a private temporary workspace and home, given the real project through --add-dir, loading only the generated TDE Control MCP config.
OpenCoderun --pure --agent tde-readonly plus OPENCODE_CONFIG_CONTENT; the generated policy denies every tool by default, allows only read and search tools plus the exact TDE Control MCP, disables sharing, skips project config, and isolates home and global config.

Claude Code's --safe-mode is used when no MCP is needed, but deliberately not for agentic chat, because it disables MCP servers — which would remove the only mutation path the agent is supposed to have.

Interactive chat

Inside tde chat, three slash commands are recognised:

text
/help  show commands
/new   start a new persisted session
/exit  close chat

Chat renders interactively when stdout is a terminal and you did not pass --json. With --json, or when stdout is a pipe or a file, it switches to a structured JSON stream instead — which is what makes tde chat usable as a scripted, non-interactive agent endpoint.

Resuming a session

bash
tde chat --session SESSION_ID

A resumed chat restores the conversation's original context, not your current defaults: the agent identity, the project and its checkout, the model, the reasoning effort, the assigned skills, the instructions, and the execution policy. Passing a different current default does not silently rewrite an existing conversation.

Every turn also gets a persistent session-and-turn idempotency namespace, so a transport retry cannot duplicate a mutation.

TDE Control MCP

Both commands register the local TDE Control MCP server with whichever official CLI they are driving, using the current executable and semantic socket path rather than a hard-coded install location. The stdio entry point is:

bash
tde control-mcp --profile default

You do not normally run this by hand. When you do want to understand its guarantees: it accepts JSON-RPC lines up to 1 MiB, runs at most 16 requests concurrently, and caps each task_watch call at 30 seconds. Clients can cancel an in-flight request with notifications/cancelled, which finishes it with the JSON-RPC cancellation error rather than leaving an unbounded watch behind.

task_create, task_run, task_cancel and task_retry each require a 1–200-byte idempotency key, fingerprinted against the normalised semantic command. Reusing a key with different arguments returns idempotency_conflict. Before dispatch, the adapter records the mutation in an owner-only journal next to the semantic socket and persists the outcome before replying, so restarting the MCP process and retrying the same key returns the original stored result instead of redispatching. A process loss in the narrow window where dispatch began but no outcome was durably recorded stays pending and fails closed as operation_outcome_unknown.

When to reach for which

You wantUse
A single answer in a script or a pipelinetde ask
A conversation you will come back totde chat
An exact, reproducible board mutationtde task …
To drive the desktop's windows and appstde agent …