Pasting code in the chat is completely broken

I’m unable to paste a code example into the Long Context Chat with Claude.

It’s getting pasted as a formatted block at the top no matter what I do. I tried copying elsewhere and then copying from there, I tried closing the file it was copied from.

Asking the Claude if it sees the example it says no. I wasted a lot of long-context chat requests today because of this.

Also when it does work (not today for some reason), it all gets heaped at the top, and it’s impossible to refer to an example in the chat, for example, this is an example of one thing, and that is an example of another. When everything gets heaped at the top, there is no way to refer to those code blocks, or you have to modify your message instead of a convenient use of a colon, you have to somehow refer to those as “first code block”, “code block with something”. This is extremely inconvenient. And also Claude doesn’t see those code blocks anyway for some reason.

1 Like

I was going to echo the same sentiment but with the cmd+K feature. When writing an inline prompt, any code that I try to paste in line gets dumped to the top of the file, like it’s going to get attached via some sort of custom system prompt, but in reality I would often like to have it inline. This feature is close to what I want, but as you mentioned, doesn’t seem to work very will with Claude. I find I get better results with Claude.ai + the artifact interface than the cmd+K or cmd+L chat interfaces.

2 Likes