metabase / metabase/metabase

Expose Metabot step-limit continuation in useMetabot

Open
#80,310 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

.Needs Triage .Team/Embedding Priority:P2 Type:Bug
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.

![Metabot paused after reaching its step limit, with Continue button](https://uploads.linear.app/a24a1a82-ddc8-4567-aacc-c3804ea2385e/6b6b56ab-b782-4341-800e-e2c5a8c28428/bb3489ce-7796-45c5-bcd1-4d84261e6fa6?signature=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXRoIjoiL2EyNGExYTgyLWRkYzgtNDU2Ny1hYWNjLWMzODA0ZWEyMzg1ZS82YjZiNTZhYi1iNzgyLTQzNDEtODAwZS1lMmM1YThjMjg0MjgvYmIzNDg5Y2UtNzc5Ni00NWM1LWJjZDEtNGQ4NDI2MWU2ZmE2IiwiaWF0IjoxNzg3MjMzODkxLCJleHAiOjE4MTg4MDQ0NTF9.Q2y9BGL_q4Usug_9Mbyiblu9ok74A_AwTRU35GoNL7s)

## 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.