Summary
The message tool can fail during schema construction when an unrelated channel plugin eagerly resolves account secrets and hits an unresolved SecretRef.
In practice, an explicit send like channel=whatsapp can still fail because tool schema generation probes Telegram/Slack capabilities first.
Repro
- Configure a channel account whose token resolves through a
SecretRef that is not currently resolvable from the active runtime snapshot (for example a cached file:localcache: ref).
- Keep another channel working, such as WhatsApp.
- Invoke the
message tool with an explicit channel send targeting the healthy channel.
Actual
Tool/schema construction probes all channel plugins, an unrelated plugin throws during listActions / capability checks, and the whole message tool fails with errors like:
channels.telegram.accounts.coder.botToken: unresolved SecretRef "file:localcache:/channels/telegram/accounts/coder/botToken"
Expected
- Explicit sends should not inspect unrelated channel configs.
- Capability probing should degrade safely when a plugin cannot resolve secrets, instead of crashing the whole
message tool.
Notes
I have a fix ready that:
- skips unrelated channel inspection for explicit sends
- wraps message capability probing in safe fallbacks so unresolved SecretRefs do not take down the tool
Local validation on the fix branch:
- targeted regression tests pass
pnpm build passes
- gateway restart succeeds
- WhatsApp
message.send dry-run succeeds after the rebuild
Summary
The
messagetool can fail during schema construction when an unrelated channel plugin eagerly resolves account secrets and hits an unresolvedSecretRef.In practice, an explicit send like
channel=whatsappcan still fail because tool schema generation probes Telegram/Slack capabilities first.Repro
SecretRefthat is not currently resolvable from the active runtime snapshot (for example a cachedfile:localcache:ref).messagetool with an explicit channel send targeting the healthy channel.Actual
Tool/schema construction probes all channel plugins, an unrelated plugin throws during
listActions/ capability checks, and the wholemessagetool fails with errors like:Expected
messagetool.Notes
I have a fix ready that:
Local validation on the fix branch:
pnpm buildpassesmessage.senddry-run succeeds after the rebuild