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

Skip to content

Conversation

@mbelinky
Copy link
Contributor

Problem

After the clawdbot→moltbot rename, some channel plugins can end up with undefined state during boot. When plugin.actions.listActions() is called on such a plugin, it throws:

Cannot read properties of undefined (reading 'listActions')

This crashes the entire agent before it can reply, showing the user:

⚠️ Agent failed before reply: Cannot read properties of undefined (reading 'listActions').

Fix

  • Wraps plugin.actions.listActions() calls in a try/catch via a new runPluginListActions() helper
  • On failure, logs the error once per plugin+message (deduped) via defaultRuntime.error()
  • Returns an empty array instead of propagating the exception
  • Affected call sites: listChannelSupportedActions() and listAllChannelSupportedActions()

Impact

Defensive fix — no behavior change when plugins work correctly. Prevents a single broken/misconfigured channel plugin from taking down the whole agent.

@moltbot-barnacle moltbot-barnacle bot added the agents Agent runtime and tooling label Jan 27, 2026
@mbelinky mbelinky added the bug Something isn't working label Jan 27, 2026
@thewilloftheshadow thewilloftheshadow self-assigned this Jan 28, 2026
Mariano Belinky and others added 3 commits January 27, 2026 19:23
Wraps plugin.actions.listActions() in a try/catch so a single
broken channel plugin cannot crash the entire agent boot sequence.

Errors are logged once per plugin+message (deduped) via
defaultRuntime.error() and the call gracefully returns an empty
array instead of propagating the exception.

Fixes: 'Cannot read properties of undefined (reading listActions)'
after the clawdbot→moltbot rename left some plugin state undefined.
@thewilloftheshadow thewilloftheshadow force-pushed the fix/channel-tools-listactions-crash branch from fd930cc to 0776161 Compare January 28, 2026 01:25
@thewilloftheshadow thewilloftheshadow merged commit 34653e4 into main Jan 28, 2026
39 of 44 checks passed
@thewilloftheshadow thewilloftheshadow deleted the fix/channel-tools-listactions-crash branch January 28, 2026 01:25
@thewilloftheshadow
Copy link
Member

Landed via temp rebase onto main.

  • Related tests: pnpm vitest run --config vitest.unit.config.ts src/agents/channel-tools.test.ts
  • Land commit: 0776161
  • Merge commit: 34653e4

Thanks @mbelinky!

@bradleypriest
Copy link
Contributor

@thewilloftheshadow did you mean to pull the bitwarden skill in with this?

@thewilloftheshadow
Copy link
Member

No, I thought I removed it in a local commit, but I guess I forgot to push that one before merging

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

Labels

agents Agent runtime and tooling bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants