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

Skip to content

Conversation

@estackk
Copy link

@estackk estackk commented Jan 30, 2026

Summary

  • Telegram auto-reconnect: grammY throws "timed out after 500 seconds" on getUpdates timeout — neither isNetworkRelatedError() (checks "timeout") nor isRecoverableTelegramNetworkError() matched "timed out", so the error was re-thrown and the channel exited permanently. Added "timed out" to both snippet arrays.
  • Rebrand legacy compat: LEGACY_CLI_NAME was set to "moltbot" (same as DEFAULT_CLI_NAME) instead of "clawdbot", and the regex alternations were duplicated (moltbot|moltbot) instead of (moltbot|clawdbot). The embedded agent's exec tool failed with command not found in environments where only clawdbot is in PATH.
  • Update restore step: dist/control-ui/ was un-tracked from git (commit 615ccf641) but the update runner still tried git checkout -- dist/control-ui/, causing a failed step. The matching dirty-check exemption in update-check.ts was also dead code.

Changes

File Change
src/telegram/monitor.ts Add "timed out" to NETWORK_ERROR_SNIPPETS
src/telegram/network-errors.ts Add "timed out" to RECOVERABLE_MESSAGE_SNIPPETS
src/telegram/network-errors.test.ts Add test for grammY timeout message format
src/cli/cli-name.ts Fix LEGACY_CLI_NAME to "clawdbot", fix regex alternation
src/cli/command-format.ts Fix regex alternation from (moltbot|moltbot) to (moltbot|clawdbot)
src/infra/update-runner.ts Remove restore control-ui step
src/infra/update-check.ts Remove :!dist/control-ui/ pathspec exclusion

Test plan

  • npx vitest run src/telegram/network-errors.test.ts — 8/8 pass (includes new "timed out" test)
  • npx vitest run src/infra/update-runner.test.ts — 8/8 pass
  • pnpm lint — 0 warnings, 0 errors
  • pnpm build — succeeds

🤖 Generated with Claude Code

estackk and others added 2 commits January 30, 2026 11:01
- Add "timed out" to NETWORK_ERROR_SNIPPETS in monitor.ts so grammY's
  getUpdates timeout message triggers reconnection instead of exiting
- Add "timed out" to RECOVERABLE_MESSAGE_SNIPPETS in network-errors.ts
  for defense in depth
- Fix LEGACY_CLI_NAME from "moltbot" to "clawdbot" and fix duplicated
  regex alternations in cli-name.ts and command-format.ts so the legacy
  binary name is recognized in PATH
- Remove restore control-ui step from update-runner.ts since
  dist/control-ui/ is no longer git-tracked (commit 615ccf6)
- Remove :!dist/control-ui/ pathspec exclusion from update-check.ts
  dirty check since those files are now gitignored
- Add test for grammY timeout message format

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@moltbot-barnacle moltbot-barnacle bot added channel: telegram Channel integration: telegram cli CLI command changes labels Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: telegram Channel integration: telegram cli CLI command changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant