> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.astropods.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.astropods.com/_mcp/server.

# Receiving platform feedback

The sidecar sends `PlatformFeedback` on the same stream when the user interacts with a previous response.

#### Node

**`PlatformFeedback`**

| Field            | Type           | Required | Notes                                                                                                                                   |
| ---------------- | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `conversationId` | string         | yes      | Conversation this feedback belongs to.                                                                                                  |
| `responseId`     | string         | no       | Which agent response this feedback relates to.                                                                                          |
| `timestamp`      | `Timestamp`    | yes      | When the feedback occurred.                                                                                                             |
| `traceContext`   | `TraceContext` | no       | Trace context of the response this feedback references, echoed back by the platform. See [Trace context](/messaging-sdk/trace-context). |
| `user`           | `User`         | no       | Platform user who submitted the feedback. Empty for anonymous/system events.                                                            |
| *one variant*    |                | yes      | One of the fields below.                                                                                                                |

**`PlatformFeedback` variants**

| Variant           | Type              | Notes                                             |
| ----------------- | ----------------- | ------------------------------------------------- |
| `reaction`        | `MessageReaction` | Thumbs up/down or custom emoji.                   |
| `promptSelection` | `PromptSelection` | User clicked a `SuggestedPrompts` entry.          |
| `buttonClick`     | `ButtonClick`     | User clicked a button on a `CardAttachment`.      |
| `streamControl`   | `StreamControl`   | User asked to stop, pause, resume, or regenerate. |
| `messageEdit`     | `MessageEdit`     | User edited their own previous message.           |
| `messageDelete`   | `MessageDelete`   | User deleted their own previous message.          |
| `text`            | `TextFeedback`    | Free-form text from a platform-native modal.      |

**`MessageReaction`**

| Field   | Type    | Required | Notes                                                                 |
| ------- | ------- | -------- | --------------------------------------------------------------------- |
| `type`  | number  | yes      | `0`=UNSPECIFIED, `1`=THUMBS\_UP, `2`=THUMBS\_DOWN, `3`=CUSTOM\_EMOJI. |
| `emoji` | string  | no       | Populated when `type === 3`.                                          |
| `added` | boolean | yes      | `true` = added, `false` = removed.                                    |

**`PromptSelection`**

| Field           | Type   | Notes                                       |
| --------------- | ------ | ------------------------------------------- |
| `promptId`      | string | Matches `Prompt.id` from a sent suggestion. |
| `promptMessage` | string | Full message being sent.                    |

**`ButtonClick`**

| Field      | Type   | Notes                        |
| ---------- | ------ | ---------------------------- |
| `buttonId` | string | Button identifier from card. |
| `value`    | string | Button value/payload.        |
| `action`   | string | Action identifier.           |

**`StreamControl`**

| Field    | Type   | Notes                                                             |
| -------- | ------ | ----------------------------------------------------------------- |
| `action` | number | `0`=UNSPECIFIED, `1`=STOP, `2`=PAUSE, `3`=RESUME, `4`=REGENERATE. |
| `reason` | string | Why (user click, error, etc.).                                    |

**`MessageEdit`**

| Field             | Type        | Notes                                |
| ----------------- | ----------- | ------------------------------------ |
| `messageId`       | string      | Platform message ID that was edited. |
| `newContent`      | string      | New content after edit.              |
| `originalContent` | string      | Original content (if available).     |
| `editedAt`        | `Timestamp` | When the edit happened.              |

**`MessageDelete`**

| Field       | Type        | Notes                                 |
| ----------- | ----------- | ------------------------------------- |
| `messageId` | string      | Platform message ID that was deleted. |
| `deletedAt` | `Timestamp` | When the delete happened.             |

**`TextFeedback`**

| Field    | Type   | Notes                                |
| -------- | ------ | ------------------------------------ |
| `text`   | string | Free-form text the user typed.       |
| `prompt` | string | Label/title shown above the textbox. |

```typescript
conversation.on('response', (resp) => {
  if (resp.feedback?.reaction) {
    const { type, added } = resp.feedback.reaction;
    log({ kind: 'reaction', responseId: resp.feedback.responseId, type, added });
  }
  if (resp.feedback?.streamControl) {
    // Cancel in-flight generation for this conversation
  }
});
```

#### Python

**`PlatformFeedback`**

| Field             | Type                        | Required | Notes                                                                                                                                   |
| ----------------- | --------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `conversation_id` | string                      | yes      | Conversation this feedback belongs to.                                                                                                  |
| `response_id`     | string                      | no       | Which agent response this feedback relates to.                                                                                          |
| `timestamp`       | `google.protobuf.Timestamp` | yes      | When the feedback occurred.                                                                                                             |
| `trace_context`   | `TraceContext`              | no       | Trace context of the response this feedback references, echoed back by the platform. See [Trace context](/messaging-sdk/trace-context). |
| `user`            | `User`                      | no       | Platform user who submitted the feedback. Empty for anonymous/system events.                                                            |
| *one variant*     |                             | yes      | One of the fields below.                                                                                                                |

**`PlatformFeedback` variants** (`oneof feedback`)

| Variant            | Type              | Notes                                             |
| ------------------ | ----------------- | ------------------------------------------------- |
| `reaction`         | `MessageReaction` | Thumbs up/down or custom emoji.                   |
| `prompt_selection` | `PromptSelection` | User clicked a `SuggestedPrompts` entry.          |
| `button_click`     | `ButtonClick`     | User clicked a button on a `CardAttachment`.      |
| `stream_control`   | `StreamControl`   | User asked to stop, pause, resume, or regenerate. |
| `message_edit`     | `MessageEdit`     | User edited their own previous message.           |
| `message_delete`   | `MessageDelete`   | User deleted their own previous message.          |
| `text`             | `TextFeedback`    | Free-form text from a platform-native modal.      |

**`MessageReaction`**

| Field   | Type   | Required | Notes                                                                    |
| ------- | ------ | -------- | ------------------------------------------------------------------------ |
| `type`  | enum   | yes      | `REACTION_TYPE_UNSPECIFIED`, `THUMBS_UP`, `THUMBS_DOWN`, `CUSTOM_EMOJI`. |
| `emoji` | string | no       | Populated when `type == CUSTOM_EMOJI`.                                   |
| `added` | bool   | yes      | `True` = added, `False` = removed.                                       |

**`PromptSelection`**

| Field            | Type   | Notes                                 |
| ---------------- | ------ | ------------------------------------- |
| `prompt_id`      | string | Matches `SuggestedPrompts.Prompt.id`. |
| `prompt_message` | string | Full message being sent.              |

**`ButtonClick`**

| Field       | Type   | Notes                        |
| ----------- | ------ | ---------------------------- |
| `button_id` | string | Button identifier from card. |
| `value`     | string | Button value/payload.        |
| `action`    | string | Action identifier.           |

**`StreamControl`**

| Field    | Type   | Notes                                                          |
| -------- | ------ | -------------------------------------------------------------- |
| `action` | enum   | `ACTION_UNSPECIFIED`, `STOP`, `PAUSE`, `RESUME`, `REGENERATE`. |
| `reason` | string | Why (user click, error, etc.).                                 |

**`MessageEdit`**

| Field              | Type                        | Notes                                |
| ------------------ | --------------------------- | ------------------------------------ |
| `message_id`       | string                      | Platform message ID that was edited. |
| `new_content`      | string                      | New content after edit.              |
| `original_content` | string                      | Original content (if available).     |
| `edited_at`        | `google.protobuf.Timestamp` | When the edit happened.              |

**`MessageDelete`**

| Field        | Type                        | Notes                                 |
| ------------ | --------------------------- | ------------------------------------- |
| `message_id` | string                      | Platform message ID that was deleted. |
| `deleted_at` | `google.protobuf.Timestamp` | When the delete happened.             |

**`TextFeedback`**

| Field    | Type   | Notes                                |
| -------- | ------ | ------------------------------------ |
| `text`   | string | Free-form text the user typed.       |
| `prompt` | string | Label/title shown above the textbox. |

```python
for resp in stub.ProcessConversation(requests()):
    if resp.HasField("feedback"):
        fb = resp.feedback
        if fb.HasField("reaction"):
            log_feedback(fb.response_id, fb.reaction.type, fb.reaction.added)
        elif fb.HasField("stream_control"):
            cancel_generation(fb.conversation_id)
```

## Next steps

* [Sending a response](/messaging-sdk/responses): the `SuggestedPrompts` and card attachments feedback refers to
* [Worked examples](/messaging-sdk/examples): feedback handling inside a full agent loop