Should Telegram Intake Share Your OpenCode Runner?

Use OpenClaw for Telegram intake and OpenCode for sandboxed repository work. Connect them only if a trial keeps approved sender identity, case ID, and the reviewed diff linked through delivery.

Make approval visible at the chat boundary

OpenClaw documents pairing as the default Telegram direct-message policy and provides separate controls for groups. If Telegram is where requests originate, establish acceptance at that boundary before letting an intake event create repository work. In an authorized test bot, send a synthetic request from a paired account and another from an unpaired test account. Assign each a distinct case ID and record whether a job was created. Repeat with a paired account sending the same ID twice. The expected outcomes are one job for the approved ID and zero jobs for the unapproved ID. Set the same ID on the eventual reply, so an operator can reconcile chat intake and delivery without inspecting message contents. This drill measures your handoff’s access and duplicate handling under the policy you actually configured.

Telegram - OpenClaw

Keep the reviewed diff attached to its case

Cloudflare documents an OpenCode sandbox that edits a repository and exposes the resulting diff for inspection. At the boundary with chat, hand the runner a case ID, a fixed repository revision, and an approved task summary. In the trial, queue two synthetic jobs against the same revision and make each request a different one-line change to a fixture. After reviewing each diff, record both its case ID and an opaque artifact ID. Deliver a receipt carrying the same identifiers and check that the reviewed and delivered artifact IDs match. A receipt can arrive quickly in the right conversation while still linking to the wrong diff. Count that as a failed delivery. This gives you a concrete threshold for keeping the chat and coding paths separate until the handoff preserves identity.

Run OpenCode in a sandbox · Cloudflare Sandboxes docs

Define what the operator must receive

Write down the artifact that proves the job is done. If it is a repository diff with a test result, pilot OpenCode. Cloudflare documents an OpenCode runner that takes a prompt, edits a GitHub repository in a Linux sandbox, and returns the changes as a diff. That gives the reviewer something concrete to inspect before accepting the work.

If the artifact is a reply in a messaging app, start by testing OpenClaw in the channel your operators already use. Give each pilot its own deadline and pass condition. A plausible chat reply leaves a coding task incomplete until the diff and test results are available. A correct patch leaves a contactability test incomplete until the operator can reach the assistant from the intended channel.

Run OpenCode in a sandbox · Cloudflare Sandboxes docs

Test the chat route after signing off

Start with one OpenClaw Telegram bot and one operator. Follow the channel setup sequence to install the bot, set its token, and approve the first direct message. Send a short request with a unique identifier and confirm that the reply arrives in the direct message. Telegram uses pairing as its default direct-message policy, so complete that step before testing the host.

If overnight access is required, repeat the request from a phone after signing out of the machine used for setup. Set a practical response deadline before the test. If the first request fails, check the bot token and pairing. If the first succeeds and the second fails, check whether the host and gateway stayed up before changing the prompt or model.

Telegram - OpenClaw

Prove the handoff with one fixture

In an illustrative pilot, a maintainer sends request 417 from a phone after signing out. The request points to a disposable branch containing a fixture where a missing optional field produces an error. The expected outcome is one regression test, a diff that fixes the fixture, and a reply in the original Telegram conversation within 15 minutes.

Have a human transfer the request to the coding runner for the first trial. E2B documents an OpenCode template and the non-interactive command opencode run, which you can use once the sandbox has access to the test checkout and model. Inspect the changed files and run the specified test before handing back the result. Score receipt, patch correctness, and return delivery independently so a failed handoff is easy to locate.

OpenCode - E2B Docs

Diagnose channel and provider failures separately

An overnight assistant adds a failure path that a supervised coding pilot can avoid. Even with a healthy chat connection, a model request can fail. The OpenClaw FAQ identifies Anthropic quota or rate-limit exhaustion as a cause of HTTP 429 errors and documents configuring a fallback model to keep the assistant replying when a provider is rate-limited.

When a message gets no useful response, first determine whether the gateway received it, then check the provider response. For a quota error, check the provider's usage and billing or wait for the quota window to reset. If you add a fallback, test it on the same harmless request and check the content as well as delivery. A timely reply with incorrect information still fails the pilot.

FAQ: providers, hardware, and hosting - OpenClaw

Sources