The prompt is used to mark the end of the buffer and so track the insertion point. If a user deletes any part of the prompt then the console will fail.
It should be straightforward to fix this, but for a now a workaround is to either (a) don't damage the prompt, or (b) repair it again if you do damage it.