chainabit ai messages list
List all messages in an AI session
Synopsis
chainabit ai messages list <session-id> [options]Arguments
| Argument | Description | Default |
|---|---|---|
<session-id> | Required. | — |
Options
| Option | Description | Default |
|---|---|---|
--limit <n> | Maximum messages to return (1–10000); ignored with --all | "50" |
--offset <n> | Number of messages to skip | "0" |
--all | Follow message cursors within the CLI result and page bounds | — |
Inherited options
| Option | Description | Default |
|---|---|---|
--resume | Resume most recent conversation | — |
--new | Force a new conversation | — |
--chat-model <key> | Model override for interactive chat session | — |
--workspace <uuid> | Workspace override (also used by ai sessions share/unshare/invite) | — |
Options shared by every command are described in Global options and shared behavior.
Behavior
Lists authorised cloud message history. It follows the server’s message cursors and treats --limit as a client result cap, default 50; --all uses the bounded collector. It returns an empty array only for the authorised no-messages condition.
Validation
--limit is an integer from 1 to 10000, default 50, and is ignored with --all. --offset is a non-negative safe integer. Collection is bounded to 100 pages and 10000 results; exceeding the page bound fails.
Output
Human output is a table of selected fields; --json prints the full returned array. Pagination metadata is not retained by this table/array projection. Help exits 0; errors exit with the codes in Exit codes.
Failures and recovery
Authentication, forbidden and missing-session errors are preserved. An authorised empty history becomes []. For collection bounds, narrow the request or choose an explicit offset.
Examples
chainabit ai messages list 00000000-0000-4000-8000-000000000001 --limit 20