Copilot Studio Agent remains stuck with ContextTokenLimitExceeded after /debug clearstate

Nguyen Tran Minh Tu 0 Reputation points
2026-09-11T02:47:00.3866667+00:00

A Copilot Studio agent deployed to Microsoft Teams is permanently stuck with ContextTokenLimitExceeded in an existing 1:1 conversation.

Issue scope:

  • The issue occurs only in the existing Microsoft Teams 1:1 chat.
  • The agent works correctly in a new Copilot Studio Test session.
  • The Helpdesk Core API connector also works normally in the Test session.

Troubleshooting performed:

  1. Sent “Start over” in the Teams conversation.
  2. Sent the command /debug clearstate.
  3. The agent returned: “The state of conversation was cleared successfully.”
  4. Sent a new short message: “xin chào”.
  5. The agent immediately returned ContextTokenLimitExceeded again.
  6. The new error still showed the same Conversation ID.
  7. Started a new Copilot Studio Test session and confirmed that the agent works normally.
  8. Confirmed that the Helpdesk Core API connector successfully retrieves ticket data in the Test session.

Error code:

ContextTokenLimitExceeded

Conversation ID starts with:

a:1yBlGghDZ15I...

Latest UTC timestamp:

2026-09-11T02:07:45.093Z

Observed behavior:

  • /debug clearstate reports success.
  • The following message still uses the same Conversation ID.
  • ContextTokenLimitExceeded is returned immediately.
  • The conversation context does not appear to be recreated.
  • A new Copilot Studio Test session works normally.

Expected behavior:

After “Start over” or /debug clearstate, the following message should begin with a fresh conversation context and should not reuse the context that exceeded the token limit.

Impact:

The affected user cannot continue using the agent in the existing Microsoft Teams 1:1 conversation.

Questions:

  1. How can Microsoft Teams be forced to create a new Copilot Studio conversation session?
  2. Is there a supported way to permanently clear or recreate the stuck conversation state?
  3. Why does /debug clearstate report success while the same Conversation ID continues to be used?

Please advise whether this behavior requires investigation or cleanup from the Microsoft service side.

Microsoft Copilot | Microsoft 365 Copilot | Development
0 comments No comments

1 answer

Sort by: Oldest
  1. Sayali-MSFT 6,476 Reputation points Microsoft External Staff Moderator
    2026-09-11T05:45:01.08+00:00

    Hello Nguyen Tran Minh Tu
    This appears to be a stuck persistent conversation state in Microsoft Teams, rather than an issue with the agent or the Helpdesk Core API connector.

    The Start over and /debug clearstate options can clear runtime state, but they don’t necessarily create a new Teams 1:1 conversation or Conversation ID. Since the same Conversation ID is reused and ContextTokenLimitExceeded returns immediately, the conversation state may not have been fully cleared. Teams conversations are persistent, unlike a new Copilot Studio Test session.
    https://learn.microsoft.com/en-us/microsoft-copilot-studio/guidance/deploy-agent-teams
    https://learn.microsoft.com/en-us/troubleshoot/power-platform/copilot-studio/authoring/error-codes?tabs=webApp

    There doesn’t appear to be a supported user-side method to force a new Conversation ID for an existing Teams 1:1 chat. Since the agent and connector work correctly in a fresh Test session, this likely requires Microsoft service-side investigation or cleanup.

    Could you please share the below details for investigation purpose:

    • Full Conversation ID
    • UTC timestamp: 2026-09-11T02:07:45.093Z
    • Error: ContextTokenLimitExceeded
    • Confirmation that /debug clearstate succeeded but the same Conversation ID was reused
    • Teams and Copilot Studio Test session comparison
    • Agent, environment, tenant, and affected-user details

    As a temporary workaround, you can test with another user or conversation scope, but the affected 1:1 thread may remain unusable until the backend state is investigated.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.