Forum Discussion

DanHuber's avatar
DanHuber
Iron Contributor
Dec 17, 2025

Incomplete ansers in code boxes

Lately, Copilot gives me more an more incomplete one line commands in code boxes.

I often get an empty code box as well.  When telling copilot to fix this, the next answer will contain the complete and correct commands. 

I would expect copilot not to make such errors.

I usually tell copilot to check the ansers before presenting to me. My prompting is surely not perfect, but it seems to me that this is more a cache or buffer problem.

Anyone has experienced similar issues? Is there a solution?

Examples:

I get 

blockdev --getsize64

the correct answer would be 

blockdev --getsize64 /dev/drbd3

copilot corrects this when I tell it to check it's output.

 

Another example, I get:

xfs_growfs /var/lib/lxc/smb/rootfs/home

df -h /var/lib/lxc

Correct answer would be

xfs_growfs /var/lib/lxc/smb/rootfs/home

df -h /var/lib/lxc/smb/rootfs/home

 

Another one:

blockdev --getsize64 /dev/dr

Correct would be:

blockdev --getsize64 /dev/drbd3

 

 

 

4 Replies

  • DanHuber's avatar
    DanHuber
    Iron Contributor

    RyanLee​ , I have noticed that too. 

    I found it inconvenient, especially when copying the whole box. 

     

  • Ambious's avatar
    Ambious
    Copper Contributor

    A temporary workaround that works most (not all) of the time is to add instructions in the settings to always add a comment at the end of code blocks.
    This causes the cutoff to at least be in the comment instead of in the code itself, but sometimes even that isn't enough.

    • RyanLee's avatar
      RyanLee
      Copper Contributor

      I kind of think that someone at Microsoft is attempting to “fix” this, using a similar method. I have noticed in the last day or two a ‘ ‘ as the last line in the code of some of the boxes that did not have any text drop off. I had never seen those added in the past.

    • DanHuber's avatar
      DanHuber
      Iron Contributor

      Hey Ambious​ , that's a clever one. 
      I've added this to the Copilot memory. I am curious if that is solving my issues. 

      Thanks!