Skip to content

[Bug]: Telegram DM topic ACP bind fails on next message with missing ACP metadata #57141

@Jackten

Description

@Jackten

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

On v2026.3.28-beta.1, binding a fresh Telegram DM topic to a Codex ACP session with /acp spawn codex --bind here can fail on the next inbound message with ACP_SESSION_INIT_FAILED because the routed :thread:<chat>:<topic> session row is missing ACP metadata.

Steps to reproduce

  1. Start OpenClaw v2026.3.28-beta.1 on Ubuntu 25.10 with Telegram and ACP thread bindings enabled.
  2. In a Telegram DM topic, send /acp spawn codex --bind here.
  3. Observe that OpenClaw confirms the ACP session was spawned and the conversation was bound.
  4. Send a normal follow-up message in the same Telegram DM topic.
  5. Observe that OpenClaw replies with ACP error (ACP_SESSION_INIT_FAILED): ACP metadata is missing for agent:codex:acp:<uuid>:thread:<chat>:<topic>.

Expected behavior

After a Telegram DM topic is successfully bound to an ACP session, follow-up messages in that same DM topic should continue routing to the bound ACP session instead of failing with missing ACP metadata.

Actual behavior

The spawn succeeds and the binding is written, but the next inbound message in the same DM topic fails with ACP_SESSION_INIT_FAILED.

Observed state from the live instance:

  • Binding store entry exists for 992769522:topic:22051 -> agent:codex:acp:68878b4b-4638-44a3-a336-91a7896d94e0
  • Base session row agent:codex:acp:68878b4b-4638-44a3-a336-91a7896d94e0 contains ACP metadata
  • Routed thread row agent:codex:acp:68878b4b-4638-44a3-a336-91a7896d94e0:thread:992769522:22051 exists but is missing acp metadata and sessionFile

OpenClaw version

v2026.3.28-beta.1 (664680318eea98172c7d25405c20f5e3eadfd0e2)

Operating system

Ubuntu 25.10

Install method

Git checkout from openclaw/openclaw, rebuilt locally, running via the user openclaw-gateway service

Model

NOT_ENOUGH_INFO

Provider / routing chain

OpenClaw Telegram DM topic -> ACP thread binding -> acpx persistent backend -> codex ACP agent

Additional provider/model setup details

  • plugins.allow includes telegram, acpx, and openclaw-codex-app-server
  • acp.enabled = true
  • acp.dispatch.enabled = true
  • channels.telegram.threadBindings.enabled = true
  • channels.telegram.threadBindings.spawnAcpSessions = true

Logs, screenshots, and evidence

User-visible error:
ACP error (ACP_SESSION_INIT_FAILED): ACP metadata is missing for agent:codex:acp:68878b4b-4638-44a3-a336-91a7896d94e0:thread:992769522:22051

Binding store:
conversationId = 992769522:topic:22051
targetSessionKey = agent:codex:acp:68878b4b-4638-44a3-a336-91a7896d94e0

Healthy base session row:
agent:codex:acp:68878b4b-4638-44a3-a336-91a7896d94e0
  acp.backend = acpx
  acp.agent = codex
  acp.state = idle

Broken routed thread row:
agent:codex:acp:68878b4b-4638-44a3-a336-91a7896d94e0:thread:992769522:22051
  origin.provider = telegram
  deliveryContext.channel = telegram
  missing: acp
  missing: sessionFile

Impact and severity

  • Affected users/systems/channels: Telegram DM topics bound to ACP sessions on this OpenClaw v2026.3.28-beta.1 install
  • Severity: High (breaks the ACP thread immediately after a successful bind)
  • Frequency: Reproduced on the fresh DM topic bind described above
  • Consequence: The ACP-bound DM topic cannot continue the conversation and instead returns an ACP initialization error

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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