# Light grey code block breaks when too much code is generated

**URL:** <https://discuss.ai.google.dev/t/light-grey-code-block-breaks-when-too-much-code-is-generated/88987>\
**Category:** Google AI Studio\
**Tags:** api, feedback\
**Created:** [June 14, 2025, 9:42pm UTC](https://discuss.ai.google.dev/t/light-grey-code-block-breaks-when-too-much-code-is-generated/88987 "2025-06-14T21:42:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![St\_Michael\_the\_Archa](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/st_michael_the_archa/32/48407_2.png) [@St\_Michael\_the\_Archa](https://discuss.ai.google.dev/u/St_Michael_the_Archa)\
**Post date:** [June 14, 2025, 9:42pm UTC](https://discuss.ai.google.dev/t/light-grey-code-block-breaks-when-too-much-code-is-generated/88987/1 "2025-06-14T21:42:05Z")

</div>

When a significant amount of code is generated, the light grey code block, with the bottom-left Copy to clipboard button and which the code is preformatted in, will eventually break and disappear leaving only a wall of plain text code. It makes distinguishing and copying and pasting the many different def methods of Python code I am working with very difficult, because the def method names lose their blue color.

Would be great if the box doesn’t ever break.

---

<div class="post-metadata">

**Author:** ![GUNAND\_MAYANGLAMBAM](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/gunand_mayanglambam/32/4964_2.png) [@GUNAND\_MAYANGLAMBAM](https://discuss.ai.google.dev/u/GUNAND_MAYANGLAMBAM)\
**Post date:** [June 16, 2025, 12:56pm UTC](https://discuss.ai.google.dev/t/light-grey-code-block-breaks-when-too-much-code-is-generated/88987/3 "2025-06-16T12:56:03Z")

</div>

Hey @St_Michael_the_Archa , Thanks for bringing this to our attention. I tried reproducing the issue using some complex prompts, but I was not able to replicate the behavior you are describing.  
To help us investigate further, could you please share a sample prompt that causes this issue for you? If possible, a screenshot of the broken code block would also be very helpful.

Thank you

---

<div class="post-metadata">

**Author:** ![St\_Michael\_the\_Archa](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/st_michael_the_archa/32/48407_2.png) [@St\_Michael\_the\_Archa](https://discuss.ai.google.dev/u/St_Michael_the_Archa)\
**Post date:** [June 23, 2025, 11:05pm UTC](https://discuss.ai.google.dev/t/light-grey-code-block-breaks-when-too-much-code-is-generated/88987/5 "2025-06-23T23:05:14Z")

</div>

I think the code block breaks somewhere around 1,500 to 1,600 lines of code.

---

<div class="post-metadata">

**Author:** ![Wes\_Hayslip](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/wes_hayslip/32/147459_2.png) [@Wes\_Hayslip](https://discuss.ai.google.dev/u/Wes_Hayslip)\
**Post date:** [September 5, 2026, 1:16am UTC](https://discuss.ai.google.dev/t/light-grey-code-block-breaks-when-too-much-code-is-generated/88987/7 "2026-09-05T01:16:51Z")

</div>

I have the same issue. Except I’m only experiencing this with 266 lines of python. Last bit of code down to line 285 is printed outside of the copy block.

 ![Screenshot from 2026-09-04 20-16-31](https://d3qe71uytubmmx.cloudfront.net/original/3X/e/a/eaf240574a599098609994f755a08c4c9b460e74.jpeg)
