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
- Start a conversation in a Telegram forum topic (group with topics enabled)
- From that session, call
sessions_spawn with runtime="acp", agentId="codex", mode="run"
- Task executes and completes successfully (output visible in gateway log)
- 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.)
Summary
When spawning an ACP session via
sessions_spawnwithruntime="acp"from a Telegram forum topic session, the ACP session'sdeliveryContextonly contains{ "channel": "telegram" }— thetofield (e.g.telegram:-1003827078672) is never inherited from the requester session. As a result, task completions never announce back to the originating chat.Environment
Steps to Reproduce
sessions_spawnwithruntime="acp",agentId="codex",mode="run"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
deliveryContextis missingtoandaccountId:Requester session (main) correctly has:
Additionally,
identity.stateremains"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_spawndelivery 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.(This error appears on runs where the wrong agent binary was specified; with correct
codex-acpbinary the task succeeds but delivery still fails.)