Blog

OpenClaw cannot find module grammy after update: rollback fix

Problem statement: you updated OpenClaw and now Telegram or Discord startup fails with Cannot find module 'grammy', Cannot find module '@buape/carbon', or a missing @grammyjs package. Search Console shows this article is visible for those exact errors, so the recovery path starts there: confirm whether bundled plugin dependencies disappeared during the update, restore service with a safe rollback or dependency repair, then pin a known-good version before retrying the upgrade.

Fast answer

If the error is openclaw "cannot find module 'grammy'", do not reinstall blindly. Capture the failing version, check whether grammy, @buape/carbon, and required @grammyjs packages exist in the runtime, then roll back to the last known-good OpenClaw version or reinstall the missing plugin dependencies in a controlled maintenance window.

Fresh evidence from the field
  • GitHub issue #58885 (opened April 1, 2026) documents how sandbox enabled by default on update breaks exec for existing single-user setups, causing allowlist misses, approval popups, and cron exec failures.
  • GitHub issue #59286 (opened April 1, 2026) reports bundled plugin dependencies not installing after updates, breaking Telegram and Discord with "Cannot find module grammy / @buape/carbon / @grammyjs/runner / @grammyjs/transformer-throttler" errors.
  • GitHub issue #60612 (opened April 4, 2026) describes doctor warnings about NVM node paths that are difficult to resolve after updates.
  • The upstream codebase added downgrade support and is_stable version flags in late March 2026 specifically to address these recovery scenarios.

Why OpenClaw updates break working setups

OpenClaw follows a frequent release model, often shipping daily. While this delivers features quickly, it also means regressions reach production before adequate testing. Three categories of breakage appear consistently in user reports:

  • Sandbox behavior changes: exec commands that worked before suddenly require allowlist configuration or interactive approval, breaking automated workflows.
  • Plugin dependency failures: bundled integrations for Telegram, Discord, and other services fail because required npm packages are not installed during updates.
  • Path and environment issues: doctor warnings about node paths, NVM configurations, and environment variables create confusion even when functionality appears intact.

What makes these failures particularly frustrating is that they affect existing, working setups. You did not change anything, but the update did. That is why having a reliable downgrade path is essential for production OpenClaw deployments.

How to diagnose whether you need a downgrade

  1. Check when symptoms started: did the problem appear immediately after an update? Use openclaw --version to confirm current version.
  2. Review error messages: allowlist errors, missing module errors, and doctor warnings about paths are strong indicators of regression.
  3. Test interactive vs automated workflows: if exec works in chat but fails in cron jobs, sandbox defaults are likely the cause.
  4. Check channel integrations: missing grammy or @buape/carbon errors after updating point to plugin dependency installation failures.
  5. Verify against known issues: search the GitHub issues for your error message and version number to confirm whether others are affected.

Downgrade methods for different deployment types

Self-hosted OpenClaw downgrade via CLI

For self-hosted instances, the CLI provides direct downgrade capability:

  • List available versions: use openclaw update --list to see available versions and their stability status.
  • Identify stable versions: look for versions marked as is_stable: true in the output—these are less likely to have known regressions.
  • Downgrade to specific version: run openclaw update --version X.Y.Z where X.Y.Z is your target version.
  • Verify downgrade: confirm with openclaw --version and test your previously broken workflows.

Managed hosting downgrade via dashboard

Managed OpenClaw hosting provides downgrade support through the Instance Settings interface:

  • Open Instance Settings: navigate to your instance settings page in the dashboard.
  • Locate version selector: find the OpenClaw version configuration in the settings tab.
  • Select previous version: choose from available versions, prioritizing those marked as stable.
  • Apply and restart: the platform will rebuild your instance with the selected version without data loss.

Docker deployment downgrade

For Docker deployments, specify the previous image tag:

  • Identify working tag: check your deployment history or logs to find the last known good image tag.
  • Update docker-compose.yml: change the image tag to the previous version (e.g., openclaw/openclaw:v0.4.123).
  • Recreate containers: run docker-compose down && docker-compose up -d to apply the rollback.
  • Preserve volumes: ensure your volume mounts are intact so workspace data persists across the downgrade.

Verifying the downgrade resolved your issues

  • Test exec commands: run previously failing exec commands from both chat and cron jobs to confirm sandbox issues are resolved.
  • Verify channel delivery: send test messages through Telegram, Discord, and other integrations to confirm plugin dependencies are restored.
  • Check doctor output: run openclaw doctor to ensure path warnings are cleared or explainable.
  • Validate cron execution: trigger your scheduled jobs manually to confirm they complete without errors.
  • Monitor logs for recurrence: watch for new errors that might indicate incomplete rollback or data migration issues.

Fix once. Stop recurring broken update regressions.

If this keeps coming back, you can move your existing setup to managed OpenClaw cloud hosting instead of rebuilding the same stack. Import your current instance, keep your context, and move onto a runtime with lower ops overhead.

  • Import flow in ~1 minute
  • Keep your current instance context
  • Run with managed security and reliability defaults

If you would rather compare options first, review OpenClaw cloud hosting or see the best OpenClaw hosting options before deciding.

OpenClaw import first screen in OpenClaw Setup dashboard (light theme) OpenClaw import first screen in OpenClaw Setup dashboard (dark theme)
1) Paste import payload
OpenClaw import completed screen in OpenClaw Setup dashboard (light theme) OpenClaw import completed screen in OpenClaw Setup dashboard (dark theme)
2) Review and launch
Evidence from the field

The upstream OpenClaw codebase added explicit downgrade support and version stability tracking in late March 2026. Commits 80fe8fd (downgrade support) and d469002 (is_stable for versions) introduced version selection APIs that allow operators to roll back to known-good releases. The implementation spans the update service, API routes, schemas, and frontend instance settings, with test coverage for safe rollback operations. This infrastructure exists because broken updates are a recurring operational reality for OpenClaw operators.

Preventing downgrade-only recovery cycles

While downgrading provides immediate relief, repeatedly rolling back indicates a deeper problem: your deployment model is incompatible with OpenClaw's release velocity. Consider these longer-term strategies:

  • Pin versions in production: lock specific OpenClaw versions and test updates in staging before promoting to production.
  • Automate regression testing: create test suites that validate your critical workflows before applying updates.
  • Separate update and deployment schedules: control when updates are applied rather than accepting automatic updates.
  • Document working configurations: record exact versions and settings for reproducible deployments.

When to consider managed hosting instead of constant downgrades

If you find yourself frequently downgrading to restore functionality, managed hosting offers a more sustainable path. The platform can:

  • Test updates before deployment: regressions are caught in platform validation before reaching your instance.
  • Apply fixes faster: platform-level patches can resolve issues without requiring manual downgrades.
  • Provide instant rollback: version selection is built into the dashboard, not a manual operation.
  • Preserve your data: workspace and configuration are maintained automatically across version changes.

For teams evaluating whether to stay self-hosted or move to managed hosting, the frequency of broken updates is a concrete metric. If you spend more time fixing regressions than using OpenClaw, the operational cost of self-hosting exceeds any nominal savings.

Specific regression patterns and workarounds

Sandbox exec failures (issue #58885)

When sandbox mode becomes enabled by default, exec commands fail because commands are not in the allowlist. The immediate fix is downgrading to a version before the sandbox default change. For longer-term resolution on updated versions, configure the allowlist explicitly or adjust sandbox settings to permit your required commands.

Missing plugin dependencies (issue #59286)

Telegram and Discord integrations fail when bundled plugin dependencies are not installed during updates. Downgrading restores the previous plugin environment. After downgrade, verify that grammy, @buape/carbon, @grammyjs/runner, and @grammyjs/transformer-throttler are present in your node_modules or plugin directory.

NVM node path warnings (issue #60612)

Doctor warnings about NVM node paths indicate that OpenClaw is not finding the expected Node.js runtime. While these warnings may not always break functionality, they create confusion and may mask real problems. Downgrading to a version before the doctor checks were enhanced can eliminate the warnings, but ensure your Node.js version remains compatible with the target OpenClaw release.

Edge cases and migration notes

  • Data schema compatibility: downgrading across major version boundaries may cause database schema mismatches. Prefer downgrading within the same minor version series (e.g., 0.4.x to earlier 0.4.y).
  • Workspace format changes: if the newer version changed workspace file formats, downgrade may cause parsing errors. Backup your workspace before downgrading.
  • Configuration migration: settings introduced in newer versions will be ignored after downgrade, but should not cause errors if they have reasonable defaults.
  • Plugin version incompatibility: some plugins may require minimum OpenClaw versions. Downgrade may disable newer plugins until you upgrade again.

Typical mistakes that delay recovery

  • Assuming the error is a configuration problem and spending hours adjusting settings when the real issue is a regression.
  • Trying to fix missing plugin dependencies manually when the root cause is a broken update process that downgrading resolves more cleanly.
  • Ignoring doctor warnings about node paths until a critical failure occurs, making diagnosis harder.
  • Deleting and recreating instances instead of downgrading, which loses workspace data and configuration history.
  • Upgrading again immediately after downgrade without waiting for upstream fixes, causing the same regression to recur.

Post-downgrade checklist

  1. Confirm OpenClaw version matches your target with openclaw --version.
  2. Verify all previously broken workflows now function correctly.
  3. Run openclaw doctor and address any legitimate warnings (distinguish from regression noise).
  4. Test integrations: send messages through all configured channels.
  5. Validate cron jobs: trigger manual runs and review logs for errors.
  6. Document the working version and regression symptoms for future reference.
  7. Decide whether to stay on current version indefinitely or watch for upstream fixes.

FAQ

How long should I wait before upgrading again after a downgrade?

Monitor the GitHub issues for your specific regression. When the issue is closed and a fix is confirmed in the changelog, test the upgrade in a non-production environment first. For critical production deployments, wait at least one week after the fix release to ensure no new regressions are reported.

Will downgrading delete my workspace data?

No, downgrading OpenClaw does not delete workspace data. Your memory files, skills, and configuration persist across version changes. However, you should always backup before significant version changes as a precaution against unexpected issues.

Can I skip specific problematic versions?

Yes, when upgrading again, you can target a specific version that includes fixes. Use openclaw update --version X.Y.Z to upgrade directly to a known-good version, bypassing the problematic release entirely.

What if downgrade does not fix my issue?

If downgrading does not resolve the problem, the issue may not be a regression. Review your configuration changes, logs, and recent modifications. Consider whether the problem coincided with the update or was caused by a separate change. Search GitHub issues and forums for similar symptoms regardless of version.

Is managed hosting immune to broken updates?

Managed hosting can still encounter upstream regressions, but the platform can respond faster. Platform operators can test updates, apply selective fixes, and provide instant rollback through the dashboard. You benefit from collective testing across all hosted instances rather than discovering issues alone.

Sources

Cookie preferences