Documentación
Ask and chat
One-shot questions and interactive chat from a shell.
En esta página
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.
tde ask "What is blocking task 41?" --project tde
tde chat --project tdeThe 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
tde ask PROMPT [--agent NAME] [--model NAME] [--project NAME]
tde chat [--agent NAME] [--model NAME] [--project NAME] [--session ID]| Option | Applies to | Meaning |
|---|---|---|
--agent NAME | both | Which configured agent to use. Defaults to the agent named Default. |
--model NAME | both | Override the agent's model for this conversation. |
--project NAME | both | Which project — and therefore which checkout — the agent works against. |
--session ID | chat | Resume 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
| Capability | Available |
|---|---|
| Read the selected project checkout | Yes |
| Create, inspect, run, watch, cancel and retry tasks | Yes, through Control MCP |
| List projects, pipelines and agents | Yes, through Control MCP |
| Read a redacted Web Share status | Yes |
| Edit, delete or commit files | No |
| Run a shell or a mutating project command | No |
| Approve or reject a human gate | No |
| Start or stop Web Share | No |
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:
| Provider | Adapter |
|---|---|
| Claude Code | Empty setting sources, Plan permissions, an explicit built-in-tool allowlist, edit tools denied, and --strict-mcp-config carrying only TDE Control. |
| Codex | exec --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. |
| OpenCode | run --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:
/help show commands
/new start a new persisted session
/exit close chatChat 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
tde chat --session SESSION_IDA 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:
tde control-mcp --profile defaultYou 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 want | Use |
|---|---|
| A single answer in a script or a pipeline | tde ask |
| A conversation you will come back to | tde chat |
| An exact, reproducible board mutation | tde task … |
| To drive the desktop's windows and apps | tde agent … |