openclaw - 💡(How to fix) Fix [Bug]: Telegram DM topic autoTopicLabel no longer renames new topics, fallback title sticks [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#62303Fetched 2026-04-08 03:06:20
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0

Telegram DM topics are no longer getting the LLM-generated auto title reliably. The topic is created with a provisional/fallback name, then never gets renamed.

In practice, this means new Telegram threads end up keeping a title that looks like the first words of the initial prompt/request instead of the concise generated label.

Root Cause

My guess is that isFirstTurnInSession is false in newly-created DM topics because the session already has prior system/bootstrap state by the time the first meaningful user turn is processed, so the auto-rename block never executes.

RAW_BUFFERClick to expand / collapse

Summary

Telegram DM topics are no longer getting the LLM-generated auto title reliably. The topic is created with a provisional/fallback name, then never gets renamed.

In practice, this means new Telegram threads end up keeping a title that looks like the first words of the initial prompt/request instead of the concise generated label.

Version

OpenClaw 2026.4.5

Expected

After the first user message in a new Telegram DM topic/session, OpenClaw should auto-rename the topic with the generated label from autoTopicLabel.

Actual

The new topic keeps the provisional creation-time title and never gets the follow-up rename.

Repro

  1. Use Telegram DM topics.
  2. Create a new thread/topic in a Telegram DM flow.
  3. Send the first real message in that topic.
  4. Observe that the topic keeps the fallback/provisional title instead of getting an LLM-generated one.

Notes

I checked the installed code and config locally:

  • autoTopicLabel still exists and is enabled by default for Telegram DM topics.
  • The rename path is still present and calls editForumTopic(...) after a generated label is returned.
  • The likely failure is that the rename path is being skipped before it ever runs.

Relevant code paths in the current build:

  • Auto-label generation + rename:

    • dist/bot-DYFDqLWF.js around the auto-topic-label block
    • calls generateConversationLabel(...)
    • then bot.api.editForumTopic(chatId, topicThreadId, { name: label })
  • First-turn gating for that path:

    • dist/bot-DYFDqLWF.js around the isFirstTurnInSession logic
    • this checks session-store state and appears to gate auto-renaming on first-turn detection

Likely regression point

My guess is that isFirstTurnInSession is false in newly-created DM topics because the session already has prior system/bootstrap state by the time the first meaningful user turn is processed, so the auto-rename block never executes.

That would fit the observed symptom exactly:

  • topic gets created with a provisional title,
  • autoTopicLabel never fires,
  • provisional title sticks.

Related

  • Feature request: #51485
  • Feature landed in: PR #51502

extent analysis

TL;DR

The issue can likely be resolved by adjusting the isFirstTurnInSession logic to correctly identify the first user turn in a newly created Telegram DM topic.

Guidance

  • Review the isFirstTurnInSession function to ensure it accurately detects the first user turn in a session, considering the presence of prior system/bootstrap state.
  • Verify that the autoTopicLabel feature is enabled and the generateConversationLabel function is being called as expected.
  • Check the session-store state to understand how it affects the isFirstTurnInSession logic and adjust the logic accordingly.
  • Test the editForumTopic API call to ensure it is working correctly and renaming the topic as expected.

Example

No code snippet is provided as the issue does not contain sufficient information to create a specific example.

Notes

The provided information suggests that the issue is related to the isFirstTurnInSession logic, but without more context or code, it is difficult to provide a definitive solution. Further investigation and debugging are necessary to resolve the issue.

Recommendation

Apply a workaround by adjusting the isFirstTurnInSession logic to correctly identify the first user turn in a newly created Telegram DM topic, as this is the most likely cause of the issue.

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