Fix Microsoft Copilot Returning Placeholder for Dice Roll
Question details
The user needs to resolve an issue where Microsoft Copilot outputs a raw code string rather than generating a random number for a dice roll.

- Product
- Microsoft Copilot
- Device & OS
- not provided
- Scenario
- Asking Copilot to roll a 20-sided die (d20) using natural language or the /r 1d20 command.
- Observed behavior
- The AI returns the literal placeholder string {{random_int(1, 20)}} instead of a randomized number.
Ensure you have a stable internet connection and try refreshing your browser or restarting the Copilot app to rule out a temporary rendering glitch on the server side.
Refresh Session and Submit Feedback
Since this is typically a backend rendering issue, reporting it and resetting your environment often resolves it.
Microsoft Copilot occasionally experiences rendering bugs where internal functions fail to execute, causing the AI to display the raw backend code instead of the final result. This is usually a temporary server-side issue.
Click the thumbs-down (dislike) icon next to the response containing the placeholder. This alerts Microsoft's engineering team to the rendering failure.
Click the 'New Topic' or 'Refresh' button to clear the current context and establish a fresh connection with the Copilot servers.
Instead of using the /r 1d20 command, try typing 'Roll a 20-sided die' in plain text to see if a different parsing method bypasses the bug.
If the issue persists in the web browser, try testing the same prompt in the Copilot mobile app, the Edge sidebar, or via the Copilot API if you have access.

Try WPS Office with Built-in AI Capabilities
If you are experiencing frequent glitches with Microsoft tools or want a reliable, unified workflow, consider switching to WPS Office. It provides a lightweight, highly compatible, and free alternative to Microsoft Office, featuring its own robust AI assistant to boost your productivity without the hefty subscription fees.
- 1. Download WPS Office: Visit the official WPS website and download the free installer for your preferred operating system.
- 2. Install and Launch: Run the installer and open WPS Office. The familiar interface will allow you to continue working on your documents immediately.
- 3. Explore WPS AI: Open a new document and activate WPS AI to assist with writing, formatting, and data analysis tasks.

Frequently Asked Questions
Why does Copilot show code instead of a dice roll?
This happens due to a temporary backend rendering failure. Copilot fails to execute the internal random number generation function and instead outputs the raw syntax, such as {{random_int(1, 20)}}.
Does Copilot support advantage and disadvantage dice rolls?
Yes, when functioning correctly, Copilot can handle advantage rolls by rolling the die twice and automatically selecting the higher number for you in the chat output.
Is the /r 1d20 command officially supported in Copilot?
Copilot generally understands standard tabletop RPG dice notation like /r 1d20. However, if a parsing bug occurs, switching to plain language like 'roll a twenty-sided die' can sometimes serve as an effective workaround.




