Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you can reproduce that, would you mind reporting it with /bug?



Just tried it with claude 3.7 sonnet, here is the share: https://claude.ai/share/68db540d-a7ba-4e1f-882e-f10adf64be91 and it doesn't finish outputing the program. (It's missing the rest of the application function and the main function).

Here are steps to reproduce.

Background/environment:

ChatGPT helped me build this complete web browser in Python:

https://taonexus.com/publicfiles/feb2025/71toy-browser-with-...

It looks like this, versus the eventual goal: https://imgur.com/a/j8ZHrt1

in 1055 lines. But eventually it couldn't improve on it anymore, ChatGPT couldn't modify it at my request so that inline elements would be on the same line.

If you want to run it just download it and rename it to .py, I like Anaconda as an environment, after reading the code you can install the required libraries with:

conda install -c conda-forge requests pillow urllib3

then run the browser from the Anaconda prompt by just writing "python " followed by the name of the file.

2.

I tried to continue to improve the program with Claude, so that in-line elements would be on the same line.

I performed these reproduceable steps:

1. copied the code and pasted it into a Claude chat window with ctrl-v. This keeps it in the chat as paste.

2. Gave it the prompt "This complete web browser works but doesn't lay out inline elements inline, it puts them all on a new line, can you fix it so inline elements are inline?"

It spit out code until it hit section 8 out of 9 which is 70% of the way through and gave the error message "Claude hit the max length for a message and has paused its response. You can write Continue to keep the chat going". Screenshot:

https://imgur.com/a/oSeiA4M

So I wrote "Continue" and it stops when it is 90% of the way done.

Again it got stuck at 90% of the way done, second screenshot in the above album.

So I wrote "Continue" again.

It just gave an answer but it never finished the program. There's no app entry in the program, it completely omited the rest of the main class itself and the callback to call it, which would be like:

        def run(self):
            self.root.mainloop()
    
    ###############################################################################
    # main
    ###############################################################################
    
    if __name__=="__main__":
        sys.setrecursionlimit(10**6)
        app=ToyBrowser()
        app.run()
so it only output a half-finished program. It explained that it was finished.

I tried telling it "you didn't finish the program, output the rest of it" but doing so just got it stuck rewriting it without finishing it. Again it said it ran into the limit, again I said Continue, and again it didn't finish it.

The program itself is only 1055 lines, it should be able to output that much.


You don't want all that code in one file anyway. Have Claude write the code as several modules. You'll put each module in its own file and then you can import functions and classes from one module to another. Claude can walk you through it.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: