openclaw - 💡(How to fix) Fix [Feature]: Per-DM/per-chat default ACP binding for auto-spawning ACP sessions on new topics [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#60737Fetched 2026-04-08 02:47:48
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Code Example

{
  "channels": {
    "telegram": {
      "direct": {
        "63448508": {
          "defaultAcp": {
            "agent": "claude",
            "mode": "persistent",
            "cwd": "/workspace/default"
          }
        }
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

[Feature]: Per-DM/per-chat default ACP binding for auto-spawning ACP sessions on new topics

Problem

When using Telegram DM forum topics with ACP agents (Claude Code, Codex, etc.), every new topic requires manually running /acp spawn claude or asking the main agent to spawn an ACP session. There is no way to configure a DM chat so that new topics automatically bind to an ACP agent.

Proposed solution

Add a defaultAcp config option to TelegramDirectConfig (and potentially TelegramGroupConfig) that auto-spawns an ACP session when a new topic/thread is created.

Config example

{
  "channels": {
    "telegram": {
      "direct": {
        "63448508": {
          "defaultAcp": {
            "agent": "claude",
            "mode": "persistent",
            "cwd": "/workspace/default"
          }
        }
      }
    }
  }
}

Behavior

  1. User creates a new topic in Telegram DM with the bot
  2. On first message in the new topic, OpenClaw detects no existing ACP binding
  3. OpenClaw auto-spawns an ACP session using defaultAcp config
  4. The topic is bound to that ACP session
  5. All subsequent messages in the topic route directly to the ACP agent
  6. Topics with explicit per-topic config (topics.<id>.agentId) should override defaultAcp

Scope

  • TelegramDirectConfig.defaultAcp - for DM topics
  • TelegramGroupConfig.defaultAcp - for group forum topics
  • Could also be a top-level TelegramAccountConfig.defaultAcp for account-wide default

Alternatives considered

  • Static bindings per topic: Works but requires manual config for each topic ID upfront
  • Main agent with auto-spawn system prompt: Wastes a main agent turn just to spawn ACP
  • /acp spawn in every new topic: Manual friction, defeats the purpose of topics as lightweight sessions

Related

  • Thread bindings: threadBindings.spawnAcpSessions
  • Existing ACP binding model: bindings[].type="acp"
  • Per-topic agentId routing: topics.<id>.agentId

extent analysis

TL;DR

To enable automatic ACP session binding for new topics in Telegram DM, add a defaultAcp configuration option to TelegramDirectConfig.

Guidance

  • Review the proposed defaultAcp config option and its properties (agent, mode, cwd) to ensure they meet your requirements.
  • Update your TelegramDirectConfig to include the defaultAcp option, using the provided JSON5 example as a reference.
  • Verify that the auto-spawn feature works as expected by creating a new topic in Telegram DM and checking if an ACP session is automatically bound to it.
  • Consider implementing a similar defaultAcp option for TelegramGroupConfig to enable auto-spawning for group forum topics.

Example

{
  "channels": {
    "telegram": {
      "direct": {
        "63448508": {
          "defaultAcp": {
            "agent": "claude",
            "mode": "persistent",
            "cwd": "/workspace/default"
          }
        }
      }
    }
  }
}

Notes

The implementation of the defaultAcp option may require updates to the OpenClaw configuration parsing and ACP session management logic.

Recommendation

Apply the proposed workaround by adding the defaultAcp option to your TelegramDirectConfig, as it provides a convenient and automated way to bind ACP sessions to new topics in Telegram DM.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING