mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-24 09:59:33 +00:00
* fix(agents): resolve "current" session alias locally without gateway round-trip The system prompt tells agents to use sessionKey="current" to refer to their own session. Previously, resolveSessionReference sent the literal string "current" to the gateway sessions.resolve action, which rejected it with INVALID_REQUEST and logged a noisy error line on every tool call. The wrapper fell back to requesterInternalKey and succeeded, so the tool worked — but the gateway error was spurious. Add "current" to the well-known client alias check in resolveCurrentSessionClientAlias so it is resolved locally to the requester's session key, matching how TUI/CLI/WebChat client labels are handled. This eliminates the unnecessary gateway round-trip and the error log line. Fixes #78424 * test: update session_status tests for local current-key resolution * test: update session_status tests for local current-key resolution * Revert "test: update session_status tests for local current-key resolution" This reverts commit d9f6c8b5248921c99f43dc222667ffa429b34401. * Revert "test: update session_status tests for local current-key resolution" This reverts commit 40bf77d06711833c1beaeedf562b60a765a559d6. * Revert "fix(agents): resolve "current" session alias locally without gateway round-trip" This reverts commit d92bc9b91e0840ea5823cd44223c139e434c5ec4. * fix(agents): preserve literal current session resolution --------- Co-authored-by: Vincent Koc <25068+vincentkoc@users.noreply.github.com>