Repository navigation
Conversation
…/thinking blocks The `isHeartbeatOkResponse` function was incorrectly rejecting assistant messages that contained non-text content blocks like "reasoning" or "thinking", even when the text content was a valid HEARTBEAT_OK acknowledgement. This caused heartbeat transcript filtering to fail, leaving stale heartbeat prompts and acknowledgements in the model context, leading to: - Major context size inflation - Model confusion from tool call artifacts that should have been filtered - 100% reproduction rate when heartbeat ACK contains reasoning blocks The fix removes the overly broad `hasNonTextContent` check, allowing messages with reasoning/thinking blocks to be properly evaluated for HEARTBEAT_OK content. Fixes issue openclaw#95796 ## Evidence ### Before Fix ```ts const message = { role: "assistant", content: [ { type: "reasoning", text: "Let me check..." }, { type: "text", text: "HEARTBEAT_OK" }, ], }; isHeartbeatOkResponse(message); // → false ❌ (should be true) ``` ### After Fix ```ts isHeartbeatOkResponse(message); // → true ✅ ``` ## Test Coverage Added test case verifying HEARTBEAT_OK detection works correctly with: - reasoning blocks - thinking blocks - output_text blocks (existing behavior preserved)
The `agents add --bind` command was generating accountId format for all channel bindings, but feishu group chats require peer-based routing.
For example:
- `openclaw agents add --bind 'feishu:oc_test'` generated:
```json
{ "match": { "channel": "feishu", "accountId": "oc_test" } }
```
- But the router expects:
```json
{ "match": { "channel": "feishu", "peer": { "kind": "group", "id": "oc_test" } } }
```
This fix adds support for two binding syntaxes:
1. `<channel>:<peerId>` - For feishu, generates peer format (default)
2. `<channel>:account:<accountId>` - Explicit accountId syntax
Examples:
- `feishu:oc_test` → `{ peer: { kind: "group", id: "oc_test" } }`
- `feishu:account:work` → `{ accountId: "work" }`
- `telegram:default` → `{ accountId: "default" }` (existing behavior)
Fixes issue openclaw#95734
## Test Coverage
Added tests in `src/commands/agents.bindings.test.ts`:
- parseBindingSpecs: feishu group binding as peer format
- parseBindingSpecs: feishu explicit accountId syntax
- parseBindingSpecs: rejects invalid binding with too many colons
- parseBindingSpecs: telegram binding as accountId (existing behavior)
- buildChannelBindings: feishu group binding as peer format
- buildChannelBindings: feishu explicit accountId binding
- buildChannelBindings: telegram binding as accountId (existing behavior)
|
Codex review: needs real behavior proof before merge. Reviewed July 8, 2026, 1:57 PM ET / 17:57 UTC. Summary PR surface: Source +39, Tests +163. Total +202 across 4 files. Reproducibility: yes. Current main parses Review metrics: 3 noteworthy metrics.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Select one compatibility-safe Feishu bind grammar, preserve channel-only and account-bind semantics, split or narrow the heartbeat fix, then land the chosen path with docs, focused tests, and redacted real CLI or routing proof. Do we have a high-confidence way to reproduce the issue? Yes. Current main parses Is this the best way to solve the issue? No. Generating peer-shaped Feishu bindings is a plausible target, but this patch is not the best fix because it breaks existing account/channel bind semantics and broadens heartbeat pruning. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against aa27ae9d9f37. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +39, Tests +163. Total +202 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (7 earlier review cycles)
|
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(agents-bind): generate peer format for feishu group bindings This is item 1/1 in the current shard. Shard 2/4. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Closing per ClawSweeper review verdict |
What Problem This Solves
Fixes a bug where
openclaw agents add --bind 'feishu:oc_test'generated bindings withaccountIdformat instead ofpeerformat, causing messages to route to the default agent instead of the intended agent.Why This Change Was Made
The routing engine matches conversations using the
peerfield for channel-specific routing (like feishu group chats), butbuildChannelBindingsandparseBindingSpecswere generatingaccountIdformat by default.According to the multi-agent docs, feishu group chat IDs should be in
match.peer: { kind: "group", id: "..." }format, notmatch.accountId.User Impact
--bind 'feishu:<groupId>'peerformat; added explicitaccount:syntax for accountId routingEvidence
Before Fix
After Fix
Explicit AccountId Syntax
For multi-account feishu setups, use the explicit syntax:
Test Coverage
Added comprehensive tests in
src/commands/agents.bindings.test.ts:All 7 tests pass.
Files Changed
src/commands/agents.bindings.ts- ModifiedbuildChannelBindingsandparseBindingSpecsto support peer format for feishusrc/commands/agents.bindings.test.ts- Added tests for new binding formatsCloses #95734