Duyetbot Agent
Community

Troubleshooting

Stuck batch? Auth fail? Decision trees for common Phase1 failures: alarms/heartbeats/auth middleware.

TL;DR: Stuck? Check heartbeats/alarms. Auth 401? Verify tokens. Decision trees below. ✅ Recover fast.

Table of Contents

Stuck Batch

From PLAN.md batch/heartbeat:

+----------------------+
| No response >30s?    |
+----------+-----------+
           |
           v
       +------------+
       | Heartbeat? |
       +---+----+---+
           |    |
       No  |    | Yes
           v    v
    +--------------+  +-------------+
    | Watchdog     |  | Processing  |
    | clears       |  +------+------+
    +--------------+         |
                             v
                      +--------------+
                      | Alarm fired? |
                      +----+-----+---+
                           |     |
                       No  |     | Yes
                           v     v
                    +--------------+  +--------------+
                    | Resend       |  | Wait         |
                    | message      |  | response     |
                    +--------------+  +--------------+

Auth Fail

From auth.ts:

+------------------------+
| 401 Unauthorized?      |
+--------+---------------+
         |
         v
     +---------------+
     | Token valid?  |
     +---+---+---+---+
         |   |   |
     No  |   |   | Bearer?
         |   |   |
         v   |   v
    +----------+  +---------------------+
    | Set env: |  | AI_GATEWAY_API_KEY  |
    | TELE/    |  +----------+----------+
    | GITHUB   |             |
    | TOKEN    |             |
    +--+-------+             |
       |                     |
       +----------+----------+
                  |
                  v
        +----------------------+
        | Deploy:              |
        | bun run config       |
        +----------------------+

Common Errors

ErrorCauseFix
Batch stuckNo heartbeatResend query
401 AuthMissing tokenbun scripts/config.ts
Tests failLint errorbun run check
Deploy failWrangler loginbunx wrangler login

Quiz: Stuck >30s?
A: Watchdog recovers ✅

Pro Tip ✅: Logs in Cloudflare dashboard.

CTA: Share fix -> Feedback | Issues

Contrib: "Fixed X via Y!"

On this page