mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 14:20:44 +00:00
fix(cli): bound sessions list output
This commit is contained in:
@@ -16,17 +16,19 @@ until a message is processed. Use `openclaw channels status --probe`,
|
||||
`openclaw status --deep`, or `openclaw health --verbose` when you need live
|
||||
channel connectivity.
|
||||
|
||||
Gateway `sessions.list` responses are bounded by default so large long-lived
|
||||
stores cannot monopolize the Gateway event loop. Pass an explicit positive
|
||||
`limit` from RPC clients when a different result window is needed; responses
|
||||
include `totalCount`, `limitApplied`, and `hasMore` when callers need to show
|
||||
that more rows exist.
|
||||
`openclaw sessions` and Gateway `sessions.list` responses are bounded by
|
||||
default so large long-lived stores cannot monopolize the CLI process or Gateway
|
||||
event loop. The CLI returns the newest 100 sessions by default; pass
|
||||
`--limit <n>` for a smaller/larger window or `--limit all` when you intentionally
|
||||
need the full store. JSON responses include `totalCount`, `limitApplied`, and
|
||||
`hasMore` when callers need to show that more rows exist.
|
||||
|
||||
```bash
|
||||
openclaw sessions
|
||||
openclaw sessions --agent work
|
||||
openclaw sessions --all-agents
|
||||
openclaw sessions --active 120
|
||||
openclaw sessions --limit 25
|
||||
openclaw sessions --verbose
|
||||
openclaw sessions --json
|
||||
```
|
||||
@@ -38,6 +40,7 @@ Scope selection:
|
||||
- `--agent <id>`: one configured agent store
|
||||
- `--all-agents`: aggregate all configured agent stores
|
||||
- `--store <path>`: explicit store path (cannot be combined with `--agent` or `--all-agents`)
|
||||
- `--limit <n|all>`: max rows to output (default `100`; `all` restores full output)
|
||||
|
||||
Export a trajectory bundle for a stored session:
|
||||
|
||||
@@ -69,6 +72,9 @@ JSON examples:
|
||||
],
|
||||
"allAgents": true,
|
||||
"count": 2,
|
||||
"totalCount": 2,
|
||||
"limitApplied": 100,
|
||||
"hasMore": false,
|
||||
"activeMinutes": null,
|
||||
"sessions": [
|
||||
{ "agentId": "main", "key": "agent:main:main", "model": "gpt-5" },
|
||||
|
||||
Reference in New Issue
Block a user