What is file_gen:generate_document?
You asked an AI assistant for a document and saw file_gen:generate_document instead of a file. Or you found that line inside text an AI wrote for you. Both cases have the same cause: it is the name of an internal tool, and it leaked into the visible text. Your content is usually fine. Only the file step is missing.
What the name means
The name has two parts. file_gen is the file-generation toolkit. generate_document is the action that turns the answer into a document file. It follows the same pattern as file_gen:generate_pdf, the PDF action from the same family.
No AI company has published documentation for this exact name. So it does not tell you which format was planned. "Document" may mean Word (DOCX), but it can also mean a text or HTML file. Check what was actually delivered, if anything.
Where people see file_gen:generate_document
- In the chat, instead of a file. The assistant tried to call the tool but the call was printed as text or failed. No download link appears.
- In the model's "thinking" notes. Some assistants show their plan before answering, for example "write this to an HTML file using file_gen:generate_document".
- Inside published AI text. When AI output is pasted straight into a website, the planning notes can come along. We found live pages where a line like
file_gen:generate_document visual element/text file tool execution is for text filessits above the real product copy.
If it is the last case, delete everything from the tool name up to where your real content starts. It is the model talking to itself, not part of your text.
How to get your document now
Fix 1: Get the text and make the file yourself (fastest)
- Reply:
Give me the full document as Markdown in the chat, not as a file. - Copy the answer.
- Paste it into the free PDF generator and click Download PDF.
Headings, lists and tables are kept. Nothing is uploaded; the file is made in your browser.
Fix 2: You need Word, not PDF
Copy the same Markdown answer, check it in the generator preview, then copy the formatted preview into Word or Google Docs and save as .docx. Or start a new chat with a model that supports file creation and ask for "a .docx file attached here".
Fix 3: A link appeared but does not download
Links like sandbox:/mnt/data/report.docx point to a temporary folder on the AI provider's server. They stop working when the session ends, which is why old chats show "File not found". Ask the assistant to create the file again in the same chat. If you use a desktop app, open the same conversation in your browser: one reported case showed a DOCX link missing in the Windows app but working in Chrome.
file_gen:generate_document vs file_gen:generate_pdf
- file_gen:generate_pdf is the PDF action. If the PDF failed, our generator creates it from the text in seconds.
- file_gen:generate_document is the general document action. The format depends on what you asked for.
Both mean the same thing when you see them in plain text: the tool did not finish, and the file was not made.
Questions
Is file_gen:generate_document a virus or an error on my computer?
No. It is only a tool name used by the AI service. It cannot run anything on your device.
Can I type file_gen:generate_document to force a file?
No. Typing the name does not turn on a missing feature. Ask for the content as text, or switch to a model or mode that can create files.
Will my text be lost?
Usually not. The writing is done before the file step. Ask for the full text in the chat and save it yourself.
Sources: Google autocomplete lists "file_gen generate_document" next to "file_gen generate_pdf" (checked November 3, 2026). Leaked tool notes seen on live pages indexed by Google (search the exact name to see them). DOCX link case: openai/codex #36933. Last updated November 3, 2026. FileGen PDF is independent and not affiliated with OpenAI, Anthropic, Google or any AI provider.