Skip to content

[BUG] macOS LaunchAgent + configure wizard creates duplicate gateway process, causing 30+ hour Telegram 409 polling conflict #43628

@michael-ruffolo

Description

@michael-ruffolo

Bug type

Regression (worked before, now fails)

Summary

Running openclaw configure (wizard) while the LaunchAgent is already managing a running gateway process leaves the original process alive. Both instances then attempt to long-poll Telegram simultaneously, producing continuous 409 Conflict errors that silently drop or misroute incoming messages for as long as both processes are alive.

Steps to reproduce

  1. Have OpenClaw running normally as a LaunchAgent (standard macOS setup)
  2. Run openclaw configure (the setup wizard) while the gateway is live
  3. Wizard completes and triggers a gateway restart
  4. New gateway process starts, but the LaunchAgent-managed old process is NOT killed first
  5. Both processes begin polling Telegram simultaneously with the same bot tokens
  6. Result: continuous 409 Conflict errors begin ~20 minutes after wizard completes

Expected behavior

When the wizard or any restart flow triggers a new gateway process, the existing LaunchAgent-managed process should be fully stopped (SIGTERM + wait for confirmation) before the new instance begins Telegram polling. The openclaw gateway stop command should be called and awaited before spawning the new process.

Actual behavior

  • gateway.err.log logged 10,996 getUpdates 409 Conflict errors over ~31 continuous hours
  • ~400 errors/hour, every hour, with no gaps
  • Error: getUpdates conflict: 409: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
  • Timeline: started March 10 ~4:09 PM EDT, resolved March 11 ~10:48 PM EDT (old process finally died on its own)
  • Trigger: openclaw configure ran at March 10 3:47 PM EDT (conflicts began ~22 minutes later)
  • All incoming Telegram messages had a ~50% chance of being silently dropped for 31 hours
  • No warning or error was surfaced to the user

OpenClaw version

2026.3.8

Operating system

macOS 15.6 (arm64, Mac Mini)

Install method

npm global (pnpm, /opt/homebrew/lib/node_modules/openclaw), LaunchAgent managed

Model

anthropic/claude-sonnet-4-6

Provider / routing chain

Anthropic

Config file / key location

No response

Additional provider/model setup details

No response

Logs, screenshots, and evidence

From gateway.err.log:


Total 409 errors: 10,996
First: 2026-03-10T16:09:22-04:00
Last:  2026-03-11T22:48:19-04:00

By day:
  2026-03-10: 2,280 errors
  2026-03-11: 8,716 errors

Sample (representative):
2026-03-11T20:00:09-04:00 [telegram] getUpdates conflict: Call to 'getUpdates' failed! (409: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running); retrying in 30s.


From gateway.log (trigger event):

2026-03-10T19:47:12Z  openclaw configure wizard last ran (from config meta)
2026-03-10T20:09:22-04:00  First 409 error logged (~22 min after wizard)


Only one process running at time of filing: PID 39074, started ~23:29 EDT March 11 (after old process finally died).

Impact and severity

High / P1 — All incoming Telegram messages silently dropped or misrouted for 31+ hours with no user-visible error. 5 bot accounts affected. User had no idea the system was broken until manually noticing missed messages.

Workaround: openclaw gateway stop && sleep 3 && openclaw gateway start

Related open issues: #40932, #41829

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions