Skip to content

Commit 7170a62

Browse files
authored
feat(agents): unify agent status into a durable progress_card (#125125)
* feat(agents): unify agent status into a durable progress_card Replace the write-only update_plan to-do tool and the fragmented plan rendering with one durable status artifact per session: progress_card ({plan?, markdown?}, replace-on-write, 8 KiB markdown / 50-step caps). Cards persist in a lazy-additive session_progress_cards table in the per-agent DB (no schema-version bump), broadcast progressCard.changed, and render from the store with exactly one live placement per view (session rail when visible, else the composer-adjacent bar); transcripts collapse to one-line receipts, and the sidebar hovercard shows other sessions' cards inline (markdown + <progress>, DOMPurify allowlist, no iframes). The three stream-derived plan renderers and their dedup heuristics are deleted. Codex runs disable the native plan tool per thread (tools.update_plan.enabled=false) and receive progress_card via the dynamic-tool bridge; compaction restore now reinjects the card (steps + bounded markdown). Card writes still emit the legacy plan stream event so native apps and channels keep working until their per-platform migrations. Policy names map update_plan -> progress_card; the shipped tools.updatePlan=false kill switch is honored. Net -277 production LOC; -480 test LOC. * test(agents): regenerate Codex prompt snapshots for update_plan thread-config disable * chore(protocol): allowlist progressCard.changed for native apps pending card migration * fix(ci): repair progress card integration checks * fix(codex): canonicalize native progress cards * test(gateway): reconcile progress card method order * test(codex): stabilize native approval fixture
1 parent 70ce8ea commit 7170a62

162 files changed

Lines changed: 3704 additions & 1642 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewayProtocol.kt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,8 @@ enum class GatewayMethod(
587587
PortalClose("portal.close"),
588588
SessionsMove("sessions.move"),
589589
SessionsAssignOwner("sessions.assignOwner"),
590+
ProgressCardGet("progressCard.get"),
591+
ProgressCardPut("progressCard.put"),
590592
}
591593

592594
enum class GatewayEvent(
@@ -642,4 +644,5 @@ enum class GatewayEvent(
642644
TerminalExit("terminal.exit"),
643645
UpdateAvailable("update.available"),
644646
PortalChanged("portal.changed"),
647+
ProgressCardChanged("progressCard.changed"),
645648
}

‎apps/shared/OpenClawKit/Sources/OpenClawKit/Resources/tool-display.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,12 +473,12 @@
473473
"status"
474474
]
475475
},
476-
"update_plan": {
476+
"progress_card": {
477477
"emoji": "🗺️",
478-
"title": "Update Plan",
478+
"title": "Progress Card",
479479
"detailKeys": [
480-
"explanation",
481-
"plan.0.step"
480+
"plan.0.step",
481+
"markdown"
482482
]
483483
},
484484
"ask_user": {

‎apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift‎

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ public enum AuthProbeStatus: String, Codable, Sendable {
4242
case noModel = "no_model"
4343
}
4444

45+
public enum ProgressCardStepStatus: String, Codable, Sendable {
46+
case pending = "pending"
47+
case inProgress = "in_progress"
48+
case completed = "completed"
49+
}
50+
4551
public enum EnvironmentStatus: String, Codable, Sendable {
4652
case available = "available"
4753
case unavailable = "unavailable"
@@ -1145,6 +1151,136 @@ public struct BoardCommandEvent: Codable, Sendable {
11451151
}
11461152
}
11471153

1154+
public struct ProgressCardStep: Codable, Sendable {
1155+
public let step: String
1156+
public let status: ProgressCardStepStatus
1157+
1158+
public init(
1159+
step: String,
1160+
status: ProgressCardStepStatus)
1161+
{
1162+
self.step = step
1163+
self.status = status
1164+
}
1165+
1166+
private enum CodingKeys: String, CodingKey {
1167+
case step
1168+
case status
1169+
}
1170+
}
1171+
1172+
public struct ProgressCard: Codable, Sendable {
1173+
public let sessionkey: String
1174+
public let revision: Int
1175+
public let updatedat: Int
1176+
public let markdown: String?
1177+
public let steps: [ProgressCardStep]?
1178+
1179+
public init(
1180+
sessionkey: String,
1181+
revision: Int,
1182+
updatedat: Int,
1183+
markdown: String? = nil,
1184+
steps: [ProgressCardStep]? = nil)
1185+
{
1186+
self.sessionkey = sessionkey
1187+
self.revision = revision
1188+
self.updatedat = updatedat
1189+
self.markdown = markdown
1190+
self.steps = steps
1191+
}
1192+
1193+
private enum CodingKeys: String, CodingKey {
1194+
case sessionkey = "sessionKey"
1195+
case revision
1196+
case updatedat = "updatedAt"
1197+
case markdown
1198+
case steps
1199+
}
1200+
}
1201+
1202+
public struct ProgressCardGetParams: Codable, Sendable {
1203+
public let sessionkey: String
1204+
1205+
public init(
1206+
sessionkey: String)
1207+
{
1208+
self.sessionkey = sessionkey
1209+
}
1210+
1211+
private enum CodingKeys: String, CodingKey {
1212+
case sessionkey = "sessionKey"
1213+
}
1214+
}
1215+
1216+
public struct ProgressCardGetResult: Codable, Sendable {
1217+
public let card: AnyCodable
1218+
1219+
public init(
1220+
card: AnyCodable)
1221+
{
1222+
self.card = card
1223+
}
1224+
1225+
private enum CodingKeys: String, CodingKey {
1226+
case card
1227+
}
1228+
}
1229+
1230+
public struct ProgressCardPutParams: Codable, Sendable {
1231+
public let sessionkey: String
1232+
public let markdown: String?
1233+
public let plan: [ProgressCardStep]?
1234+
1235+
public init(
1236+
sessionkey: String,
1237+
markdown: String? = nil,
1238+
plan: [ProgressCardStep]? = nil)
1239+
{
1240+
self.sessionkey = sessionkey
1241+
self.markdown = markdown
1242+
self.plan = plan
1243+
}
1244+
1245+
private enum CodingKeys: String, CodingKey {
1246+
case sessionkey = "sessionKey"
1247+
case markdown
1248+
case plan
1249+
}
1250+
}
1251+
1252+
public struct ProgressCardPutResult: Codable, Sendable {
1253+
public let card: AnyCodable
1254+
1255+
public init(
1256+
card: AnyCodable)
1257+
{
1258+
self.card = card
1259+
}
1260+
1261+
private enum CodingKeys: String, CodingKey {
1262+
case card
1263+
}
1264+
}
1265+
1266+
public struct ProgressCardChangedEvent: Codable, Sendable {
1267+
public let sessionkey: String
1268+
public let revision: AnyCodable
1269+
1270+
public init(
1271+
sessionkey: String,
1272+
revision: AnyCodable)
1273+
{
1274+
self.sessionkey = sessionkey
1275+
self.revision = revision
1276+
}
1277+
1278+
private enum CodingKeys: String, CodingKey {
1279+
case sessionkey = "sessionKey"
1280+
case revision
1281+
}
1282+
}
1283+
11481284
public struct ConnectParams: Codable, Sendable {
11491285
public let minprotocol: Int
11501286
public let maxprotocol: Int

‎config/assertion-safety-baseline.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2175,7 +2175,6 @@ src/agents/tools/system-agent-tool.ts 1
21752175
src/agents/tools/task-suggestion-tools.ts 2
21762176
src/agents/tools/terminal-tool.ts 1
21772177
src/agents/tools/tts-tool.ts 1
2178-
src/agents/tools/update-plan-tool.ts 4
21792178
src/agents/tools/video-generate-tool.ts 4
21802179
src/agents/tools/web-fetch.ts 3
21812180
src/agents/tools/web-guarded-fetch.ts 2

‎docs/cli/openclaw.md‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,9 @@ Message-channel rescue mode never uses the model-assisted planner. Remote rescue
249249
Embedded runtimes and the Codex app-server harness enforce the ring-zero
250250
restriction directly: the run carries an OpenClaw tool allow-list with only
251251
the `openclaw` tool. For Codex, OpenClaw also disables environments, native
252-
execution, multi-agent, goal, app/plugin, skill/MCP, web-search, and
253-
`request_user_input` surfaces for that run. Codex still injects its inert native `update_plan`
254-
utility; it can update the model's temporary checklist but cannot write files
255-
or OpenClaw configuration. CLI harnesses do not consume OpenClaw's allow-list,
252+
execution, multi-agent, goal, app/plugin, skill/MCP, web-search,
253+
`request_user_input`, and its native planning utility for that run. CLI
254+
harnesses do not consume OpenClaw's allow-list,
256255
so OpenClaw admits only backends whose own tool-selection contract can prove
257256
the same restriction:
258257

‎docs/concepts/system-prompt.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The built-in GPT-5-family prompt contribution (`resolveGpt5SystemPromptContribut
3030

3131
The prompt is compact, with fixed sections:
3232

33-
- **Tooling**: structured-tool source-of-truth reminder plus runtime tool-use guidance. When the `update_plan` tool is enabled (`tools.updatePlan`, on by default), its own tool description adds: use it only for non-trivial multi-step work, keep at most one step `in_progress`, and skip it for simple one-step work.
33+
- **Tooling**: structured-tool source-of-truth reminder plus runtime tool-use guidance. When `progress_card` is enabled (`tools.updatePlan`, on by default), its own description explains how to maintain one durable plan and status note, keep at most one step `in_progress`, and skip routine updates that do not change the picture.
3434
- **Execution Bias**: act in-turn on actionable requests, continue until done or blocked, recover from weak tool results, check mutable state live, and verify before finalizing.
3535
- **Promised Work**: promising future, background, delegated, or continued work creates follow-through ownership: arrange a push-based completion or watch path before ending the turn, proactively return with the result or a concrete blocker, and never treat progress (like `running`) as completion.
3636
- **Safety**: short guardrail reminder against power-seeking behavior or bypassing oversight.

‎docs/docs.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,6 +1386,7 @@
13861386
"tools/code-mode",
13871387
"tools/diffs",
13881388
"tools/screen",
1389+
"tools/progress-card",
13891390
"tools/show-widget",
13901391
"tools/elevated",
13911392
"tools/permission-modes",

‎docs/gateway/config-tools.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Local onboarding defaults new local configs to `tools.profile: "coding"` when un
2323
| Profile | Includes |
2424
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2525
| `minimal` | `session_status` only |
26-
| `coding` | `group:fs`, `group:runtime`, `group:web`, `group:sessions`, `group:memory`, `cron`, `get_goal`, `create_goal`, `update_goal`, `update_plan`, `ask_user`, `skill_workshop`, `view_image`, `image_generate`, `music_generate`, `video_generate` |
26+
| `coding` | `group:fs`, `group:runtime`, `group:web`, `group:sessions`, `group:memory`, `cron`, `get_goal`, `create_goal`, `update_goal`, `progress_card`, `ask_user`, `skill_workshop`, `image`, `image_generate`, `music_generate`, `video_generate` |
2727
| `messaging` | `group:messaging`, `sessions`, `sessions_list`, `sessions_history`, `sessions_search`, `conversations_list`, `conversations_send`, `conversations_turn`, `sessions_send`, `sessions_spawn`, `sessions_yield`, `subagents`, `session_status`, `ask_user` |
2828
| `full` | No restriction (same as unset) |
2929

@@ -42,8 +42,8 @@ Local onboarding defaults new local configs to `tools.profile: "coding"` when un
4242
| `group:automation` | `heartbeat_respond`, `cron`, `gateway` |
4343
| `group:messaging` | `message` |
4444
| `group:nodes` | `nodes`, `computer` |
45-
| `group:agents` | `agents_list`, `get_goal`, `create_goal`, `update_goal`, `update_plan`, `ask_user`, `skill_workshop` |
46-
| `group:media` | `view_image`, `image_generate`, `music_generate`, `video_generate`, `tts` |
45+
| `group:agents` | `agents_list`, `get_goal`, `create_goal`, `update_goal`, `progress_card`, `ask_user`, `skill_workshop` |
46+
| `group:media` | `image`, `image_generate`, `music_generate`, `video_generate`, `tts` |
4747
| `group:openclaw` | All built-in tools above except `read`/`write`/`edit`/`apply_patch`/`exec`/`process`/`canvas` (excludes plugin tools) |
4848
| `group:plugins` | Tools owned by loaded plugins, including configured MCP servers exposed through `bundle-mcp` |
4949

@@ -425,19 +425,19 @@ Controls inline attachment support for `sessions_spawn`.
425425

426426
### `tools.updatePlan`
427427

428-
Kill switch for the structured `update_plan` checklist tool used for non-trivial multi-step work tracking.
428+
Kill switch for `progress_card`, the durable plan and status note used for non-trivial multi-step work tracking.
429429

430430
```json5
431431
{
432432
tools: {
433-
updatePlan: false, // hide update_plan from every run
433+
updatePlan: false, // hide progress_card from every run
434434
},
435435
}
436436
```
437437

438438
- Default: `true` for every provider and model. Set `false` to keep the tool off; there is no model-specific auto-enable rule.
439-
- The tool description adds usage guidance so the model only uses it for substantial work and keeps at most one step `in_progress`.
440-
- `tools.deny: ["update_plan"]` also removes the tool, so use whichever surface already carries your tool policy.
439+
- The tool description tells the model to keep the plan current, use at most one `in_progress` step, and add Markdown only when it contributes information beyond the steps.
440+
- Use `progress_card` in new `tools.allow` and `tools.deny` policies. Existing policies that name `update_plan` map to `progress_card`, so shipped allowlists and denylists keep their meaning.
441441

442442
Older configs used `tools.experimental.planTool`. Run `openclaw doctor --fix` to move the value to `tools.updatePlan`.
443443

‎docs/gateway/sandbox-vs-tool-policy-vs-elevated.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ Available groups:
9898
| `group:sessions` | `sessions`, `sessions_list`, `sessions_history`, `sessions_search`, `conversations_list`, `conversations_send`, `conversations_turn`, `sessions_send`, `sessions_spawn`, `sessions_yield`, `subagents`, `session_status`, `suggest_task`, `dismiss_task` |
9999
| `group:memory` | `memory_search`, `memory_get` |
100100
| `group:web` | `web_search`, `x_search`, `web_fetch` |
101-
| `group:ui` | `browser`, `screen`, `terminal`, `canvas`, `show_widget` |
101+
| `group:ui` | `browser`, `screen`, `terminal`, `canvas`, `progress_card`, `show_widget` |
102102
| `group:automation` | `heartbeat_respond`, `cron`, `gateway` |
103103
| `group:messaging` | `message` |
104104
| `group:nodes` | `nodes`, `computer` |
105-
| `group:agents` | `agents_list`, `get_goal`, `create_goal`, `update_goal`, `update_plan`, `ask_user`, `skill_workshop` |
106-
| `group:media` | `view_image`, `image_generate`, `music_generate`, `video_generate`, `tts` |
105+
| `group:agents` | `agents_list`, `get_goal`, `create_goal`, `update_goal`, `progress_card`, `ask_user`, `skill_workshop` |
106+
| `group:media` | `image`, `image_generate`, `music_generate`, `video_generate`, `tts` |
107107
| `group:openclaw` | most built-in OpenClaw tools (excludes the `read`/`write`/`edit`/`apply_patch`/`exec`/`process` fs and runtime primitives, `canvas`, and provider plugins) |
108108
| `group:plugins` | all loaded plugin-owned tools, including configured MCP servers exposed through `bundle-mcp` |
109109

‎docs/plugins/codex-harness-reference.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,12 +601,15 @@ Codex's own tool-search surface:
601601
- `apply_patch`
602602
- `exec`
603603
- `process`
604-
- `update_plan`
605604
- `tool_call`
606605
- `tool_describe`
607606
- `tool_search`
608607
- `tool_search_code`
609608

609+
`progress_card` is not filtered with those native workspace tools. It remains
610+
available through the OpenClaw dynamic-tool bridge as the durable session status
611+
surface.
612+
610613
When a finite runtime allowlist disables native Code Mode, OpenClaw sends an
611614
empty execution-environment selection. In that direct, unsandboxed case,
612615
OpenClaw keeps its policy-filtered `exec` and `process` tools as the shell

0 commit comments

Comments
 (0)