# Ask and answer

URL: /code/sdk/guides/ask-and-answer · Id: `page:code/sdk/guides/ask-and-answer`

> Any Action can stop to ask a Party a Question and resume when it is answered, from the Portal, email, chat, MCP, the SDK or the CLI.

Any [Action](/business/nouns/action) can stop mid-run to ask a [Question](/business/nouns/question), and it resumes when the answer arrives. The one asking is any [Worker](/business/nouns/worker); the one asked is any [Party](/business/nouns/party), the [Customer](/business/nouns/customer) included.

## Ask
`patentpad.com` drafts provisional patents. Its drafting [Agent](/business/nouns/agent) finds two inventions in one disclosure and asks the Customer which one to claim:

```ts
import { $ } from 'startup-builder'

const question = await $.Action.ask({
  action: 'action_42',
  to: 'customer_9',
  text: 'Your disclosure describes two inventions. Which should the draft claim?',
  choices: ['The hinge', 'The latch', 'Both, as two drafts'],
  answerBy: '2026-10-25T17:00:00Z',
})
```

[`Action.ask`](/business/nouns/action/ask) holds the Action `pending` with reason `awaitingInput` and posts the Question in the [Thread](/business/nouns/thread) of the record it concerns, here the [Order](/business/nouns/order). `choices` renders as a picker; `schema` renders typed fields; with neither, the answer is free text. Every Question is kept on its Action with its answer.

## Answer from anywhere
The asked Party answers wherever they already are. Each path calls [`Action.answer`](/business/nouns/action/answer), and the Action resumes on the first valid answer.

| Where the Party is | What they see |
| --- | --- |
| The [Startup](/business/nouns/startup)'s [Portal](/business/nouns/portal) | A form: `choices` as a picker, `schema` as fields |
| Email | The Question in one [Message](/business/nouns/message); the reply is the answer |
| A connected chat workspace | A card with the choices as buttons ([Chat delivery](/systems/communications/chat)) |
| An MCP client | An elicitation request from the server |
| The SDK or the CLI | The pending Action, answered with one call |

```ts
await $.Action.answer({ action: 'action_42', question: 'question_1', payload: { choice: 'The hinge' } })
```

```bash
npx startup-builder do Action.answer --json '{"action":"action_42","question":"question_1","payload":{"choice":"The hinge"}}'
```

A free-text reply in the Thread is kept as a Message. An Agent maps it onto the Question's choices or schema and records the answer, citing the Message.

## Who may answer
Only the asked Party answers, or a Worker acting for them under a [Mandate](/business/nouns/mandate). An Agent that answers for a [Human](/business/nouns/human) records both: `by` is the Agent and `for` is the Human. Any other answer is refused and changes nothing.

`awaitingInput` is the one pending reason that asks the caller to act. `npx startup-builder pending` lists every Action waiting on the signed-in identity, Questions first.

## Clocks
While the Customer holds a Question, the Order's delivery window and its service level pause. While a Worker holds one, both keep running, so a slow internal answer counts against the Startup.

At `answerBy`, an unanswered Question ends the wait by the rule its [Verb](/business/nouns/verb) declares: proceed on a stated default, or cancel the Action. Either way, the outcome is recorded on the Question.

## Events
Asking emits `Action.asked`, and answering emits `Action.answered`. A [Watch](/business/nouns/watch) on either reaches any system that tracks open Questions, such as a support queue counting time spent waiting on Customers.