Skip to content

ACP session deliveryContext missing 'to' field — announce not routing back to requester channel (Telegram forum/topic) #33049

@ClawKPA

Description

@ClawKPA

Summary

When spawning an ACP session via sessions_spawn with runtime="acp" from a Telegram forum topic session, the ACP session's deliveryContext only contains { "channel": "telegram" } — the to field (e.g. telegram:-1003827078672) is never inherited from the requester session. As a result, task completions never announce back to the originating chat.

Environment

  • OpenClaw: 2026.3.2
  • Channel: Telegram (forum/topic group chat)
  • Backend: acpx 0.1.15
  • Agent: codex (codex-acp 0.9.5)
  • macOS (arm64)

Steps to Reproduce

  1. Start a conversation in a Telegram forum topic (group with topics enabled)
  2. From that session, call sessions_spawn with runtime="acp", agentId="codex", mode="run"
  3. Task executes and completes successfully (output visible in gateway log)
  4. No announcement arrives in the originating Telegram chat

Expected Behavior

ACP session inherits full delivery context from requester session (channel + to + accountId) and announces result back to the originating chat on completion.

Actual Behavior

ACP session deliveryContext is missing to and accountId:

"deliveryContext": {
    "channel": "telegram"
}

Requester session (main) correctly has:

"deliveryContext": {
    "channel": "telegram",
    "to": "telegram:-1003827078672",
    "accountId": "default"
}

Additionally, identity.state remains "pending" indefinitely — the ACP identity handshake never completes, which may be related.

Additional Notes

This appears to be a regression introduced in 2026.3.2 with the change that rejects explicit sessions_spawn delivery params (target, channel, to, threadId, etc.) and replaces them with automatic inheritance from the requester session. The auto-inheritance is not working for Telegram forum/topic channels.

Gateway log shows the ACP turn completing successfully (state: idle, task output visible) but the announce step silently fails due to missing routing target.

⇄ res ✗ agent errorCode=UNAVAILABLE errorMessage=AcpRuntimeError: acpx exited with code 4 ... code=ACP_TURN_FAILED

(This error appears on runs where the wrong agent binary was specified; with correct codex-acp binary the task succeeds but delivery still fails.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    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