Expose Metabot step-limit continuation in useMetabot
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 49.3k
- Forks
- 6.8k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 653
Description
## Title
Expose Metabot step-limit continuation in `useMetabot`
## Description of the bug
When Metabot reaches its step limit, `` displays the error state and **Continue** button. A custom Metabot rendered with `useMetabot` exposes neither this UI nor the data needed to render it.

## Reproduction steps
1. Temporarily lower the maximum iteration to `2` in [profiles.clj](), matching the reproduction in metabase/metabase#79860.
2. Render `` with “year-over-year order count by product”. The **Continue** button appears normally.
3. Render a custom Metabot with `useMetabot`. The error state and **Continue** button are not exposed, and no `useMetabot` data is available to wire them up.
## Expected behavior
`useMetabot` should expose the step-limit error state and data required to render the continuation UI, consistent with ``.
## Logs
None observed.
## Diagnostic information
Tested at `9a675a4749fd66158e08d15aa9c4aca7205b3f85`. Code verification indicates the issue should also occur on `master` at `3989cb5eb38481d980888a58fbc374a4092a8c89`.
## Severity
P2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the `useMetabot` entry point with the `` behavior, using the step-limit reproduction and the maximum-iteration setting in `src/metabase/metabot/agent/profiles.clj`. Trace how the error state and Continue action are represented, then verify that a custom Metabot can access the required state and data to render equivalent continuation UI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100