A command a file defines shows the prompt it sends in both palettes, and a workspace's asks once before it is first sent while auto_approve is on, its prompt in view¶
Decision 814 · accepted · 2026-10-08 · issue #371
- A workspace's command asks once while
auto_approveis on (Troupe.Commands.run/4, whichcommands.runcalls). Withauto_approveoff every tool call the prompt leads to asks anyway, so nothing more is asked; with it on, the first run of aprojectcommand asks before anything is sent, the way a workspace's MCP servers ask before they start (700): aquestion_askedon the session's question path, so any client answers it, with the optionsdeny,onceandallow,denyfirst so a client that answers with the first option (the terminal client's headless mode) sends nothing. The question is one sentence, because the terminal client draws a question on one line, and the prompt as it would be sent, arguments in, rides beside it aspreview, a new optional field ofquestion_askedthat both clients draw as it is under the question.commands.runanswers at once withquestionnaming the call; the prompt is sent when the answer comes, from a task of its own. - Keyed on the checkout, the command and its prompt.
allowis remembered in<state>/command-trust.json(Troupe.Commands.Trust), under the checkout's key asTroupe.MCP.Trustfiles it (a worktree shares its checkout's answers), as command name to a sha256 of the file's body. So an edited command is another prompt and asks again, and what is typed after the name, or a re-ordered directory, does not. Per command rather than once per workspace: a yes to/review's prompt says nothing about/deploy's, and the point is that what was seen is what was agreed to. The answers live in the state directory, never in the repository: a file the repository carried would be the repository approving itself. oncesends it this time and remembers nothing. Any other answer, free text included, sends nothing and writescommand_declined(name,reason,command_id), a new durable event whosereasonsays it was not sent and how to run it later: run it again to be asked again, andallowstops the asking until the file changes. A session nobody can answer in (approvals: deny) declines on the spot and says so, with how it would run: where somebody can answer, or withauto_approveoff. A session that stops while the question is out sends nothing, and running the command again asks again.- Who is not asked. A person's own commands, since the person wrote them, and a
workspace on
trusted_workspaces, as 700 does for MCP servers: trusting it already lets itsconfig.yamlturnauto_approveon and name commands to run, so a question about a prompt would guard nothing the trust has not already given. The question is aboutauto_approveas the session holds it now (Approvals.auto_approve?/1), so a client's--auto-approvecounts as a config file's does. - What this does not undo. 763 stands: a workspace's commands are read and listed whether or not it is trusted, no built-in is shadowed, and no frontmatter changes tools, models or approvals. This is not a trust gate on reading a command; it is the one question asked when nothing else would ask before its prompt is acted on.
Governs: apps/troupe_core/lib/troupe/commands.ex, apps/troupe_core/lib/troupe/commands/trust.ex, apps/troupe_core/lib/troupe/session/approvals.ex, apps/troupe_core/lib/troupe/session/questions.ex