Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@czekaj
Copy link
Contributor

@czekaj czekaj commented Jan 22, 2026

Summary

  • Fix Discord exec failing with "invalid exec.approval.request params: at /resolvedPath: must be string"
  • TypeBox Type.Optional(Type.String()) accepts string | undefined but NOT null
  • Callers were passing null explicitly, causing AJV validation to reject the request
  • Web UI worked because it skipped the approval request path (requiresAsk = false)

Changes

  • src/agents/bash-tools.exec.ts: Change resolvedPath: nullundefined, remove ?? null fallbacks
  • src/cli/nodes-cli/register.invoke.ts: Change resolvedPath: nullundefined, sessionKey: nullundefined
  • src/gateway/server-methods/exec-approval.test.ts: Add regression tests documenting valid/invalid param values

Test plan

  • pnpm test src/gateway/server-methods/exec-approval.test.ts passes (5 tests)
  • Manual test: trigger exec from Discord session (e.g., pwd, echo hi)

🤖 Generated with Claude Code

TypeBox Type.Optional(Type.String()) accepts string|undefined but NOT null.
Discord exec was failing with 'resolvedPath must be string' because callers
passed null explicitly. Web UI worked because it skipped the approval request.

Fixes exec approval validation error in Discord-triggered sessions.
@czekaj czekaj force-pushed the fix/discord-exec-resolvedpath-validation branch from 47155dc to de898c4 Compare January 22, 2026 02:15
@steipete steipete self-assigned this Jan 22, 2026
@steipete steipete merged commit 721737c into openclaw:main Jan 22, 2026
15 of 22 checks passed
@steipete
Copy link
Contributor

Landed via temp rebase onto main.\n\n- Gate: pnpm lint && pnpm build && pnpm test (failed: 48 tests in 22 files; plugin validation missing lobster manifest + config defaults failures; details in local run)\n- Land commit: 43b55a8\n- Merge commit: 721737c\n\nThanks @czekaj!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants