Contributed a bug fix to OpenClaw — “The AI that really does things” — one of the most-starred open-source AI agent projects on GitHub (390k+ ⭐).
The Problem
Before an agent runs a command on a node, OpenClaw records a user approval and later replays that approval to execute the command. A node’s prepared command plan could omit the Gateway session key: approval creation filled that identity into the approval binding, but left it missing in the stored plan. At replay time the two identities no longer matched, so commands the user had already approved were refused (issue #151622).
The Fix
When recording an approval, the missing working directory, agent, and session metadata are now completed in the plan itself, using the same request fallbacks as the binding — while explicitly prepared values keep precedence. Replay consumes one consistent stored plan, and all approval-equality and authority checks stay unchanged.
- A minimal, targeted production change (+9 / −4 lines) with new regression tests
- No protocol, permission, or storage-schema changes
- Maintainers credited the diagnosis and original repair
- Merged upstream on 11 October 2026