How AIClaw 3.12.22 Preserves Command Approval Outcomes in Chat History
When you decline a command, the live execution list should tell you what happened. Reopen the conversation later and that same tool entry should still explain why the command stopped. Before AIClaw 3.12.22, the live completion event could arrive before the command result reached the journal. The history view also inferred failure from the saved tool-result text. AIClaw 3.12.22 records the…
When a user declines a command, the system provides a detailed explanation of why the action halted. Revisiting the conversation later will reveal the same message. Prior to version 3.12.22, the live completion event could arrive before the command's outcome reached the journal. As a result, the history view would infer a failure based on the saved tool-result text.
AIClaw 3.12.22 rectifies this issue by explicitly recording the approval outcome and writing the result before transmitting the tool completion. The previous execution path emphasizes that a v3.12.22 release maintains the reasoning behind why a command stopped. The approval path categorizes three possible outcomes: an explicit refusal, a canceled approval wait, and a failure to obtain a usable approval response.
The host RPC mandates an explicit boolean decision, and any response lacking a decision, null response, or non-boolean decision is considered a host failure. This ensures that the tool entry retains a reason, even if the approval dialog never yields a usable answer. By logging the tool result with item ID, timing, approval outcome, and displayed text in the execution list, the agent creates a comprehensive record.
It then emits the item/completed event. When reopening the chat, the agent retrieves the saved metadata to rebuild the entry. Older transcripts lacking an explicit approval outcome still rely on the existing tool-result fallback. The modification pertains to the outcome of an approval attempt. The configured approval policy still governs when the agent must request approval.
The Go regression test verifies the stored history by checking the ID, outcome, and result text for refusal, cancellation, and approval failure scenarios. Additionally, a separate host RPC test supplies malformed replies to ensure the local agent and server suites pass with the race detector. These tests rigorously exercise the stored history and host protocol using fixtures.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to