openclaw/src
Azade 3133c7c84e feat(sessions): expose label in sessions.list and support label lookup in sessions_send
- Add `label` field to session entries and expose it in `sessions.list`
- Display label column in the web UI sessions table
- Support `label` parameter in `sessions_send` for lookup by label instead of sessionKey

- `sessions.patch`: Accept and store `label` field
- `sessions.list`: Return `label` in session entries
- `sessions_spawn`: Pass label through to registry and announce flow
- `sessions_send`: Accept optional `label` param, lookup session by label if sessionKey not provided
- `agent` method: Accept `label` and `spawnedBy` params (stored in session entry)

- Add `label` column to sessions table in web UI

- Changed session store writes to merge with existing entry (`{ ...existing, ...new }`)
  to preserve fields like `label` that might be set separately

We attempted to implement label persistence "properly" by passing the label
through the `agent` call and storing it during session initialization. However,
the auto-reply flow has multiple write points that overwrite the session entry,
and making all of them merge-aware proved unreliable.

The working solution patches the label in the `finally` block of
`runSubagentAnnounceFlow`, after all other session writes complete.
This is a workaround but robust - the patch happens at the very end,
just before potential cleanup.

A future refactor could make session writes consistently merge-based,
which would allow the cleaner approach of setting label at spawn time.

```typescript
// Spawn with label
sessions_spawn({ task: "...", label: "my-worker" })

// Later, find by label
sessions_send({ label: "my-worker", message: "continue..." })

// Or use sessions_list to see labels
sessions_list() // includes label field in response
```
2026-01-09 15:32:49 +01:00
..
agents feat(sessions): expose label in sessions.list and support label lookup in sessions_send 2026-01-09 15:32:49 +01:00
auto-reply feat(sessions): expose label in sessions.list and support label lookup in sessions_send 2026-01-09 15:32:49 +01:00
browser refactor(browser): share chrome resolution helpers 2026-01-08 02:18:43 +00:00
canvas-host Tests: stabilize file watchers 2026-01-09 11:06:39 +01:00
cli fix: honor gateway --dev flag 2026-01-09 15:25:51 +01:00
commands test: stabilize sandbox/doctor tests 2026-01-09 15:17:20 +01:00
config feat(sessions): expose label in sessions.list and support label lookup in sessions_send 2026-01-09 15:32:49 +01:00
cron feat: wire multi-agent config and routing 2026-01-09 12:48:42 +00:00
daemon fix: prevent systemd hang on restart with podman sandboxes 2026-01-09 02:37:00 +01:00
discord feat: wire multi-agent config and routing 2026-01-09 12:48:42 +00:00
gateway feat(sessions): expose label in sessions.list and support label lookup in sessions_send 2026-01-09 15:32:49 +01:00
hooks fix(ci): stabilize windows tests 2026-01-08 03:54:35 +00:00
imessage feat: wire multi-agent config and routing 2026-01-09 12:48:42 +00:00
infra fix(discovery): decode dns-sd escaped UTF-8 2026-01-09 14:56:01 +01:00
logging test: update google-shared expectations 2026-01-09 03:04:16 +01:00
macos chore: log gateway reload and signals 2026-01-09 08:13:04 +01:00
markdown fix: preserve markdown fences when chunking 2026-01-06 20:23:41 +01:00
media chore: update ClawdBot CLI branding 2026-01-08 05:20:39 +01:00
msteams fix: land mac node bridge ping loop (#572) (thanks @ngutman) 2026-01-09 14:01:20 +01:00
pairing fix: clarify WhatsApp owner number prompts 2026-01-09 13:32:52 +01:00
process chore: rename project to clawdbot 2026-01-04 14:38:51 +00:00
providers test: align status and google-shared expectations 2026-01-09 05:03:12 +01:00
routing feat: wire multi-agent config and routing 2026-01-09 12:48:42 +00:00
sessions feat: multi-agent routing + multi-account providers 2026-01-06 18:33:37 +00:00
signal feat: wire multi-agent config and routing 2026-01-09 12:48:42 +00:00
slack feat: wire multi-agent config and routing 2026-01-09 12:48:42 +00:00
telegram fix: land mac node bridge ping loop (#572) (thanks @ngutman) 2026-01-09 14:01:20 +01:00
terminal feat(cli): improve gateway status output 2026-01-09 09:27:42 +01:00
tui feat(sessions): expose label in sessions.list and support label lookup in sessions_send 2026-01-09 15:32:49 +01:00
types feat: add slack multi-account routing 2026-01-08 08:49:16 +01:00
utils feat: finalize msteams polls + outbound parity 2026-01-09 11:07:32 +01:00
web feat: wire multi-agent config and routing 2026-01-09 12:48:42 +00:00
wizard feat: wire multi-agent config and routing 2026-01-09 12:48:42 +00:00
entry.ts feat(cli): improve gateway status output 2026-01-09 09:27:42 +01:00
globals.test.ts chore: format to 2-space and bump changelog 2025-11-26 00:53:53 +01:00
globals.ts feat: refresh CLI output styling and progress 2026-01-08 05:20:39 +01:00
index.test.ts fix: preserve whatsapp group JIDs 2025-12-23 03:05:59 +01:00
index.ts refactor: centralize unhandled rejection setup 2026-01-07 20:59:49 +00:00
logger.test.ts style: format tests and helpers 2026-01-04 14:57:57 +00:00
logger.ts fix(logging): decouple file logs from console verbose 2026-01-03 12:32:14 +00:00
logging.ts style: format after gate 2026-01-09 05:27:54 +00:00
polls.test.ts feat: unify poll support 2026-01-06 04:51:05 +00:00
polls.ts feat: unify poll support 2026-01-06 04:51:05 +00:00
provider-web.barrel.test.ts build: add local node bin to restart script PATH 2025-12-07 19:01:14 +01:00
provider-web.ts feat: unify gateway heartbeat 2025-12-26 02:35:40 +01:00
runtime.ts chore: format to 2-space and bump changelog 2025-11-26 00:53:53 +01:00
utils.test.ts chore: rename project to clawdbot 2026-01-04 14:38:51 +00:00
utils.ts fix(ci): stabilize windows paths 2026-01-08 03:03:03 +00:00
version.ts chore: rename project to clawdbot 2026-01-04 14:38:51 +00:00