openclaw-code-agent 4.0.1 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,8 +6,8 @@
6
6
 
7
7
  `openclaw-code-agent` is the OpenClaw plugin for running Claude Code and Codex as managed background coding sessions from chat. Launch work from Telegram, Discord, or any OpenClaw-supported channel, review the plan before execution, keep the job isolated in its own git worktree, and merge or open a PR without leaving the thread.
8
8
 
9
- - **Plan -> Review -> Execute**. `plan` is the default launch mode, with `ask`, `delegate`, and `approve` deciding how much plan approval autonomy the orchestrator gets.
10
- - **Optional worktree isolation**. New sessions default to `off`; opt into `ask`, `delegate`, `auto-merge`, or `auto-pr` when you want worktree-backed branch isolation and post-run branch handling.
9
+ - **Plan -> Review -> Execute**. `plan` is the default launch mode, and plan approval defaults to `delegate` so the orchestrator reviews the full plan before approving or escalating to the user.
10
+ - **Delegated worktree isolation**. New sessions default to `delegate`; opt into `ask`, `off`, `manual`, `auto-merge`, or `auto-pr` when you want a different branch follow-through policy.
11
11
  - **State-driven decision UX**. `ask` sends explicit action buttons for **Merge locally**, **Create PR**, **Decide later**, and **Dismiss**. The same action-token model now backs both Telegram and Discord interactive callbacks.
12
12
  - **Lifecycle-first cleanup**. Worktrees are treated as temporary task sandboxes. The plugin distinguishes `merged` from `released` so different-SHA branches whose content already landed on the base branch can still be cleaned safely.
13
13
  - **Full session lifecycle**. Suspend, resume, fork, interrupt, and recover sessions across restarts with persisted metadata and output.
@@ -28,13 +28,14 @@ Need the ACPX vs Codex vs code-agent breakdown? See [docs/ACP-COMPARISON.md](doc
28
28
 
29
29
  The shared substrate is often the local `codex` command and Codex App Server, but the responsibilities are different. This plugin is not an ACP server and it does not depend on OpenClaw's bundled Codex provider to expose its own `codex` harness.
30
30
 
31
- ## New In 4.0.1
31
+ ## New In 4.1.1
32
32
 
33
- `4.0.1` is the OpenClaw `v2026.4.25` compatibility patch release. It keeps the `4.0.0` messaging-contract cleanup intact while refreshing the verified local build/test target and adding guard coverage for newer OpenClaw plugin-install and embedded-extension behavior.
33
+ `4.1.1` is the OpenClaw `2026.5.4` compatibility patch. It keeps the `4.1.0` managed-lifecycle and notification reliability work intact, preserves the `>=2026.4.21` compatibility floor, and aligns harness model/thinking behavior with the newer OpenClaw release line.
34
34
 
35
- - **Verified OpenClaw target**. Local build/test metadata now targets stable OpenClaw `2026.4.25` while keeping the minimum compatibility floor at `>=2026.4.21`.
36
- - **Install-registry compatibility**. Guard coverage now confirms plugin code does not read or write OpenClaw's legacy authored install metadata.
37
- - **Embedded-extension compatibility**. Guard coverage now documents the removed embedded-extension factory path and keeps future tool-result rewriting aligned with OpenClaw's runtime-neutral middleware contract.
35
+ - **Managed TaskFlow lifecycle**. When the current OpenClaw runtime exposes managed TaskFlow APIs, code-agent sessions now create, update, wait, and finalize a gateway-owned flow record; older runtimes fall back cleanly without changing session behavior.
36
+ - **Deterministic runtime state**. Completion and no-change paths now surface canonical approval/runtime state instead of asking operators to infer it from transcript text.
37
+ - **Notification delivery reliability**. Direct notification timeouts, fallback failures, and completion-delivery diagnostics are handled explicitly so failed delivery is visible instead of silently hanging.
38
+ - **Verified OpenClaw target**. Local build/test metadata targets stable OpenClaw `2026.5.4` while keeping the minimum compatibility floor at `>=2026.4.21`.
38
39
 
39
40
  ## From Prompt To Merged Branch
40
41
 
@@ -118,21 +119,26 @@ Install and enable the plugin:
118
119
  openclaw plugins install openclaw-code-agent
119
120
  openclaw plugins enable openclaw-code-agent
120
121
  openclaw gateway restart
122
+ openclaw plugins inspect openclaw-code-agent --runtime --json
121
123
  ```
122
124
 
123
- This release targets the OpenClaw `v2026.4.21` external plugin contract and is verified against the stable `v2026.4.25` build/test target. `package.json` now carries the plugin API compatibility and build metadata used by modern OpenClaw / ClawHub installs, and `openclaw.plugin.json` now advertises the plugin-owned command activation surface plus the onboarding metadata OpenClaw uses during plugin-config setup. Keep those metadata surfaces in sync when bumping the plugin release baseline.
125
+ Restart or reload the gateway only as part of your normal install/upgrade flow; it is not needed for editing docs or preparing a release branch.
124
126
 
125
- The current manifest descriptors stay intentionally narrow: activation advertises only the chat commands this plugin owns, and setup stays minimal with `requiresRuntime: false`. First-run onboarding is driven by the manifest config schema and `uiHints`, not by provider/backend setup descriptors.
127
+ This release targets the OpenClaw `v2026.4.21` external plugin contract and is verified against the stable `v2026.5.4` build/test target. `package.json` carries the plugin API compatibility and build metadata used by modern OpenClaw / ClawHub installs, and `openclaw.plugin.json` advertises the plugin-owned startup, command activation surface, tool contracts, and onboarding metadata OpenClaw uses during plugin-config setup. Keep those metadata surfaces in sync when bumping the plugin release baseline.
128
+
129
+ After install or update, inspect the runtime plugin view after the gateway restart. The runtime inspection should show the chat commands, service, and `agent_*` / `goal_*` tools without diagnostics. If `tools.effective` or `tools.invoke` cannot see `agent_launch` or `agent_sessions`, the installed plugin is stale or the gateway has not restarted onto the updated manifest and bundle.
130
+
131
+ The current manifest descriptors stay intentionally narrow: activation advertises startup loading plus only the chat commands this plugin owns, and setup stays minimal with `requiresRuntime: false`. First-run onboarding is driven by the manifest config schema and `uiHints`, not by provider/backend setup descriptors.
126
132
 
127
133
  ### First-Run Onboarding
128
134
 
129
135
  In OpenClaw's Manual setup flow, the plugin should only ask for three first-run decisions:
130
136
 
131
- - `defaultWorkdir`: the repo or workspace path you expect to launch from most often
137
+ - `defaultWorkdir`: the git repo path you expect to launch from most often
132
138
  - `defaultHarness`: whether your default harness is `claude-code` or `codex`
133
139
  - `fallbackChannel`: an optional but recommended fully routable notification target for async updates
134
140
 
135
- Everything else stays advanced/manual. In particular, `agentChannels`, per-harness model policy, permission defaults, and worktree policy are intentionally deferred until after the first successful launch.
141
+ Everything else stays advanced/manual. In particular, `agentChannels`, per-harness model policy, permission defaults, and worktree policy are intentionally deferred until after the first successful launch, even though plan approval and worktree follow-through now default to delegated behavior. If your first launch must run outside a git repo, expand Advanced during setup or edit config afterwards and set `defaultWorktreeStrategy` to `off`.
136
142
 
137
143
  Add a minimal config block under `plugins.entries["openclaw-code-agent"]` in `~/.openclaw/openclaw.json`:
138
144
 
@@ -167,8 +173,10 @@ Add a minimal config block under `plugins.entries["openclaw-code-agent"]` in `~/
167
173
  You can leave the advanced settings at their defaults for the first run. The plugin defaults to:
168
174
 
169
175
  - `permissionMode: "plan"`
170
- - `planApproval: "ask"`
171
- - `defaultWorktreeStrategy: "off"`
176
+ - `planApproval: "delegate"`
177
+ - `defaultWorktreeStrategy: "delegate"`
178
+
179
+ Because delegated worktree follow-through is now the default, the first-run `defaultWorkdir` should normally point at a git repository. Non-git workdirs are still supported by setting `defaultWorktreeStrategy: "off"` globally or by launching with `worktree_strategy: "off"`.
172
180
 
173
181
  If you run Codex sessions, keep Codex on the ChatGPT auth path:
174
182
 
@@ -204,11 +212,27 @@ For multi-workspace or multi-bot setups, configure `agentChannels`. The full rou
204
212
 
205
213
  Prefer fully routable channel strings such as `telegram|123456789` or `telegram|my-bot|123456789`. A bare provider like `telegram` is only a weak fallback; the plugin now repairs topic routing from `originSessionKey` when possible, but explicit channels are still the safer default.
206
214
 
207
- ### Upgrade Note For 3.2.0
215
+ ### Upgrade Notes
216
+
217
+ For OpenClaw `2026.5.4` readiness:
218
+
219
+ - Build and SDK metadata now target OpenClaw `2026.5.4`; the peer floor remains `>=2026.4.21` for existing compatible installs.
220
+ - If your OpenClaw config uses an exclusive `plugins.allow` list, include `openclaw-code-agent` or the plugin's `agent_*` / `goal_*` tools will not load even if `tools.allow` names them.
221
+ - Harness model policy should live under `harnesses.codex.*` and `harnesses["claude-code"].*`. Legacy `defaultModel`, `model`, `reasoningEffort`, and global `allowedModels` are compatibility-only. Configured `reasoningEffort` supports `low`, `medium`, `high`, `xhigh`, and `max`.
222
+ - Codex and Claude Code restrictions are harness-scoped. Codex defaults to `gpt-5.5` with `gpt-5.5` / `gpt-5.5-pro` allowed; Claude Code defaults to `anthropic/claude-sonnet-4-7` with `sonnet` / `opus` matching.
223
+ - `tools.deny` does not disable OpenClaw's `apply_patch` tool by itself. Use OpenClaw's `tools.exec.applyPatch.*` settings when you need patch-tool policy.
224
+
225
+ For `4.1.0`:
226
+
227
+ - Managed TaskFlow integration is opportunistic. It uses OpenClaw's current managed-flow runtime when available and degrades to the existing session-only behavior when that surface is absent.
228
+ - Direct notification failures are now surfaced more explicitly. Treat a missing button delivery as a delivery/routing problem, not as evidence that the underlying plan or worktree state changed.
229
+ - Runtime and approval state fields in wakes are authoritative. Prefer them over transcript fragments when deciding whether execution was approved, bypassed, completed, or still waiting.
230
+
231
+ For `3.2.0`:
208
232
 
209
233
  If you are upgrading from `3.1.0`, the important behavioral changes are:
210
234
 
211
- - `defaultWorktreeStrategy` is back to `off`, so worktree isolation remains opt-in unless you configure it explicitly.
235
+ - `defaultWorktreeStrategy` now defaults to `delegate`, so new sessions use worktree isolation and orchestrator-led follow-through unless you configure or launch with a different strategy.
212
236
  - `auto-merge` now attempts one autonomous conflict resolution before escalating.
213
237
  - Completion wakes and no-change outcomes are deterministic and carry explicit approval/execution state instead of relying on transcript inference.
214
238
  - Worktree cleanup is lifecycle-first and can now classify already-landed branches as `released`, which makes `preview_safe` and `clean_safe` more trustworthy after rebase, squash, or cherry-pick flows.