{"slug": "i-let-free-web-gemini-code-my-terrarium-and-now-the-worms-are-having-an-identity", "title": "I Let Free Web Gemini Code My Terrarium, and Now the Worms are Having an Identity Crisis", "summary": "A developer tested whether free web-based Gemini models could add new features to an existing Pygame terrarium simulation, using a custom VS Code extension called ReptClip to bundle context and apply AI-generated diffs. After context-dumping failures and hallucinated patches, Gemini Flash successfully applied a working feature on the second attempt, but subsequent attempts with Gemini Pro and Gemini Extended Thinking to make the worms more biologically accurate produced non-functional or invisible results.", "body_md": "*If you want to see Gemini building the most \"biologically accurate\" worms for my Terrarium simulation, please read till the end.*\n\nI built a [Pygame terrarium simulation](https://github.com/effessdev/terrarium) a while back (please wait, the video may take a second to load):\n\nI decided to check whether free web-based LLMs can add entirely new features to this Python codebase without blowing everything up.\n\nNo expensive subscriptions. Just a free browser chatbot, my VS Code extension, and a **whole lot of trial and error**.\n\nLet's open up the project in VS Code:\n\nTo feed my codebase into the AI, I used [ReptClip for VS Code](https://github.com/effessdev/reptclip-vscode), a VS Code extension I built to bundle context quickly & apply the diffs generated by the chatbot. I started out optimistic (and lazy), adding `README.md`, `requirements.txt`, and literally **every single Python file** into the context:\n\nI opened Google AI Studio, and pasted the entire codebase directly in:\n\n64,000 tokens right off the bat! Let's start with a simple request:\n\nAnd...\n\nOk. So they want my money. But I have plenty of other things to do with it.\n\nDumping all Python files was a mistake. Let's try again. We'll feed the AI *only* the project directory structure, the README, and `requirements.txt` first, and let the AI tell us which specific files it actually needs to read.\n\nI hit send.\n\nScrew AI Studio. I moved over to gemini.google.com. I tried pasting all the Python files again:\n\nWhat? The browser chat UI silently truncated the context I pasted in, without showing a single warning!\n\nIt can't stop me! I know the exact workaround:\n\nMy extension can write output to files too. Good thing I made that into a feature. Does it work if I upload it?\n\nYep! Let's type the prompt and hit send!\n\nNow we're talking! It actually gave me the diffs according to the output instructions added by my extension into the context:\n\nA 108 lines diff, which was surprising. Now, I can copy the diffs and click **Apply Diffs** in my extension. It will automatically read them from the clipboard and apply the changes. Let's try that:\n\nFail. Because I dumped every file at once, the AI hallucinated too much and \"Apply Diffs\" failed. I tried once more:\n\nAnd again:\n\nEven though ReptClip supports fuzzy matching in SEARCH blocks, the AI hallucinated too much so the extension wasn't able to find a match.\n\nTime to get serious about context management. The new plan:\n\n`requirements.txt`\nIt gave a list of the files it want to see:\n\nSince we already added project structure and diff format, let's uncheck them, and add the files Gemini asked:\n\nLuckily, it didn't get truncated!\n\nGemini generated the new diff (165 lines):\n\nI ran ReptClip's **Apply Diffs** again...\n\nThe diffs applied cleanly with only one fuzzy match!\n\nMoment of truth: let's launch the terrarium:\n\nWait...\n\nIt **ACTUALLY** worked??! I wasn't expecting that on the second try, especially from a small flash model!\n\nTime to make it harder. The new feature:\n\nI passed the requested files via ReptClip. Flash generated a suspiciously tiny diff that literally fit into a single screenshot:\n\nI applied it anyway:\n\nAnd ran the simulation:\n\nWell... it did *something*. The worms looked a bit different, but it was definitly far from what I asked.\n\nTime to unleash **Gemini Pro**.\n\nGemini Pro immediately started dropping massive biology jargon in its response:\n\nIt produced a 265-line diff modifying 2 files. I applied it and launched the simulation:\n\nNothing. I couldn't even identify the worms.\n\nI thought maybe they were growing or waiting for nighttime. I waited in front of the simulation at **8x speed** for days*:\n\nStill empty!\n\nWell... Let's try with **Gemini Extended Thinking**:\n\nThe reasoning model thought through the logic and proudly claimed it found the **exact** bug:\n\nI applied its recommended patch:\n\nSTILL NO WORMS.\n\nLet me handle this alone without taking a screenshot every 5 seconds. I'll come back soon.\n\n🏃 ...\n\nSo, according to Gemini, this was the reason:\n\nAnyway, I gave it `ant.py` so it could refer to it and generate proper diffs. This time, I **was** able to see something!\n\nReady to see the magnificent peristalsis, anchoring, and bunching up that Gemini 3.1 Pro was bragging about?\n\nI don't want you to see it yet. Please scroll down:\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n🔻\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n🔻\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n🔻\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n🔻\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n🔻\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n🔻\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n🔻\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n🔻\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n🔻\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n⬇️\n\n🔻\n\nYep! THAT is what actual **peristalsis** looks like! 🤣", "url": "https://wpnews.pro/news/i-let-free-web-gemini-code-my-terrarium-and-now-the-worms-are-having-an-identity", "canonical_source": "https://dev.to/effessdev/i-let-free-web-gemini-code-my-terrarium-and-now-the-worms-are-having-an-identity-crisis-57n2", "published_at": "2026-09-28 11:14:04+00:00", "updated_at": "2026-09-28 11:19:28.340229+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "generative-ai", "developer-tools"], "entities": ["Google", "Gemini", "Gemini Pro", "Google AI Studio", "VS Code", "ReptClip", "Pygame"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/i-let-free-web-gemini-code-my-terrarium-and-now-the-worms-are-having-an-identity", "markdown": "https://wpnews.pro/news/i-let-free-web-gemini-code-my-terrarium-and-now-the-worms-are-having-an-identity.md", "text": "https://wpnews.pro/news/i-let-free-web-gemini-code-my-terrarium-and-now-the-worms-are-having-an-identity.txt", "jsonld": "https://wpnews.pro/news/i-let-free-web-gemini-code-my-terrarium-and-now-the-worms-are-having-an-identity.jsonld"}}