spacedriveapp / spacedriveapp/spacebot

Telegram: retrigger relay failure drops final response after worker completion

Open
#581 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2.4k
Forks
367
PR merge metrics
No merged PRs in 30d

Description

Summary

We’re seeing Telegram turns where the assistant appears to start/finish, but the final full response is not delivered.

Observed behavior

In logs, the sequence is:

  1. worker completed, result queued for retrigger
  2. retrigger produced text without reply tool, sending as fallback
  3. retrigger relay failed, preserving result in history for next turn

So generation succeeds, but delivery fails at retrigger relay. User sees partial output (e.g., opener line) and then nothing.

Expected behavior

If retrigger/fallback text is generated successfully, it should be delivered in the same turn (or user should get an explicit delivery-failed notice).

Related

Possibly adjacent to #258, but this is specifically a delivery failure in retrigger relay, not worker stalling.

Proposed solution (for discussion)

  1. Add retry/backoff for retrigger relay send (2–3 attempts).
  2. Log transport error details (status code + sanitized response body snippet + adapter/channel context).
  3. If retries fail, send a short fallback notice (e.g., "delivery failed; response preserved, send continue to replay").
  4. Add regression test: retrigger text generated, first relay send fails, retry/fallback path verified.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the retrigger relay path that logs “retrigger produced text without reply tool” and “retrigger relay failed,” then inspect existing delivery and regression tests. Reproduce the generated-text delivery failure, verify the retry and fallback behavior described in the issue, and confirm the response remains available for a later continue.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.