Dan Corin

Dan Corin

@danielcorin.com

Software Engineer, AI Engineer and Coach Running wvlen: https://www.wvlen.com I write at www.danielcorin.com and build stuff at https://github.com/danielcorin

115 followers83 following128 posts

For my stateful agent, I run a private, real-time dashboard on top of a Cloudflare durable object. This allows me to monitor tool calls and progress without needing the agent to constantly send messages to my chat client. These events are read and published directly from logs.

I realized this was silly. Adding hook instrumentation allows me to see the tools in thread in the message client without requiring the agent to invoke the tool to send messages. It's a little noisy but solves the problem in the spot I care about it

My stateful agent has been deploying websites and apps it builds during its autonomous work blocks. Before this, it posted interactive pages to its blog. Before that, it wrote posts and before that, scripts and simulations on its VM. Usually, I need to show it the way before an architectural leap.

I’m experimenting with building, persisting, and running code itself from ATProto. Most apps use ATProto to store content for the app. This approach treats the code as content. The app can be loaded using a viewer that anyone can implement, login with Bluesky, storing data as ATProto records.

The URL shows who built it and whose data you're viewing: /@user.xyz/linkblog/@danielcorin.com/web App code from @user.xyz. Webview of data from @danielcorin.com, stored as ATProto records. The viewer handles OAuth, token refresh, rendering. The bundle just calls window.atproto.createRecord().

Maybe it's just me but I really enjoy making chat components to narrate language model conversation for my blog posts and in general. This has been one of the deepest forays into design that I've taken, trying to get these to look just how I had in mind.

Having done a lot of vibe coding lately, I think I’ll move away from it exclusively. Current agents eventually fail to adhere to some prompt despite various attempts and approaches. Whenever this happens and I look in the codebase I am usually mortified by what I find.

View full thread

I can vibe code a fun game but eventually, I may not be able to add more features due to the unmaintainable sprawl the model eventually creates. There is a small cost here. I have to be a touch more thoughtful as I build something to ensure the agent is staying on the rails.

In doing so I understand how my project works, learn new things as I collaborate with the agent, and keep the code in a state where it can continue to be extended. I’ll definitely progress more slowly but I won’t fly off the rails either.

Having done a lot of vibe coding lately, I think I’ll move away from it exclusively. Current agents eventually fail to adhere to some prompt despite various attempts and approaches. Whenever this happens and I look in the codebase I am usually mortified by what I find.

View full thread

The agent cannot be prompted to code itself out of the hole it digs. I’ve tried. I’ve told the model to identifying duplication and refactor. I’ve read the code and identified the points of duplication then told the model where and prompted for a refactor. State of the art models and agents fail.

So where do I go from here? I’ve actually had immense success writing code using agents and models with my hands on the wheel. For production code, this has always been the only viable option. But for personal projects, I now appreciate the ceiling vibe coding placed upon them.

Having done a lot of vibe coding lately, I think I’ll move away from it exclusively. Current agents eventually fail to adhere to some prompt despite various attempts and approaches. Whenever this happens and I look in the codebase I am usually mortified by what I find.

View full thread

The agents just do things. Yes let plan, read files, make tool calls and use MCPs. But then they just *go* and that is a problem. From experience, I don’t think I ever want an agent to even start writing code without proposing a plan for what it wants to do.

At this juncture, I could evaluate the plan and pull in more context in case the agent missed something. To be able to do a good job of that, I need to know the codebase, at least architecturally. I need to know how state is managed, what libraries are used, how the file hierarchy is organized.

Having done a lot of vibe coding lately, I think I’ll move away from it exclusively. Current agents eventually fail to adhere to some prompt despite various attempts and approaches. Whenever this happens and I look in the codebase I am usually mortified by what I find.

View full thread

These problems can’t be anticipated. You can’t rule-write your way out of them because you rarely know what the X0,000 line codebase should look like when it’s only X,000 lines. You can write code that remains flexible and is refactorable but today only the human knows when there’s a problem.

Having done a lot of vibe coding lately, I think I’ll move away from it exclusively. Current agents eventually fail to adhere to some prompt despite various attempts and approaches. Whenever this happens and I look in the codebase I am usually mortified by what I find.

View full thread

It’s too late. For every convention rule you do write there will be one you miss. The agent will invisibly write working code that makes decisions on your behalf, filling in under specified requirements, and eventually you will have spaghetti.

The code will work and meet your requirements, but if you don’t read the code, you’re not going to realize when the model deviates in its approach from what you considerable reasonable.

Having done a lot of vibe coding lately, I think I’ll move away from it exclusively. Current agents eventually fail to adhere to some prompt despite various attempts and approaches. Whenever this happens and I look in the codebase I am usually mortified by what I find.

View full thread

Now the codebase has fragmented state. Viber comes back to the codebase 15 commits later. The application has grown considerably. GPUs, brrr, etc. Prompts the agent to make more changes using the state and it fails. Follow up prompts, debugging, MCPs. Why isn’t it working?

Finally cracks open the code. What am I even looking at? Ever tried to grok XX thousands lines of legacy code? Not easy. Use the model to find which code to look at. State is everywhere. State in hooks. State in redux. State in zustand. I really should have written rules for conventions.

Having done a lot of vibe coding lately, I think I’ll move away from it exclusively. Current agents eventually fail to adhere to some prompt despite various attempts and approaches. Whenever this happens and I look in the codebase I am usually mortified by what I find.

View full thread

Agents use search to look around a codebase to find relevant files to pull into context. You can also use rules to define how an agent should structure the codebase. At some point, often unbeknownst to the viber, the agent fails to pull a relevant file into the context window.

Initially, this doesn’t seem like a problem. The agent does what it does best. Writes code to solve the problem. No shared states available in the React app? No problem, it’ll write some hooks for you. Viber validates the behavior in the browser. Looks good? Commit and ship. Never reads the code.

Having done a lot of vibe coding lately, I think I’ll move away from it exclusively. Current agents eventually fail to adhere to some prompt despite various attempts and approaches. Whenever this happens and I look in the codebase I am usually mortified by what I find.

You might argue I need to use rules better or something like that. I would say that isn’t vibe coding. I interpret vibe coding as the agent addressing whatever whim I have in the realm of the possible, figuring it out for me. Mostly, I end up with spaghetti codebases that the agent cannot untangle.

Agents love to generate code. Give one a task and it is off to the races. In a new project, this isn’t the worst thing. In a project with existing functionality, this becomes a problem due to a combination of lack of context and lack of effective planning. The two go hand in hand.

Having done a lot of vibe coding lately, I think I’ll move away from it exclusively. Current agents eventually fail to adhere to some prompt despite various attempts and approaches. Whenever this happens and I look in the codebase I am usually mortified by what I find.

View full thread

In doing so I understand how my project works, learn new things as I collaborate with the agent, and keep the code in a state where it can continue to be extended. I’ll definitely progress more slowly but I won’t fly off the rails either.

Having done a lot of vibe coding lately, I think I’ll move away from it exclusively. Current agents eventually fail to adhere to some prompt despite various attempts and approaches. Whenever this happens and I look in the codebase I am usually mortified by what I find.

View full thread

At this juncture, I could evaluate the plan and pull in more context in case the agent missed something. To be able to do a good job of that, I need to know the codebase, at least architecturally. I need to know how state is managed, what libraries are used, how the file hierarchy is organized.

I need to know this in case the model misses anything, so I can step in and make the correction. If I only find out the model has been doing weird state duplication and synchronization when the agent finally stops being to make progress, it is too late.

View full thread

Please(!) do not use this approach for things that affect production systems or require strict correctness. Consider it for things like summarization, code scaffolding, writing initial unit tests and more generative tasks. It could work well when you're already scripting LLM calls.

If you are just using the model to repeatedly run deterministic code, you would probably be better of prompting the model to generate actual code from your spec instead.

Specs become condensed shortcuts for invoking prompt sequences referencing other files, resources or code. It's like the LLM equivalent of a shell script, but instead of writing scripts to make calls to LLMs, you write prompts which the agent executes, gluing inferences together with code for you

What happen to completion models like `text-davinci-003`? Why does no one train or release these types of models anymore? Maybe I am just romanticizing early models, but I recall this model being much more steerable that chat models because there was no bias to responding conversationally

Vibe coding is tantalizing in that it often can feel like you’re one prompt away from solving a problem when you are not. I’ve wasted plenty of time rolling the dice with the Cursor agent when I could have just dug in and done the work (even LLM assisted in a lower level way) and finished faster.

I’ve been experimenting with feeding around 200 log posts from my site into an LLM to summary, following a certain template structure. The result have been pretty promising with Haiku and Sonnet. With a bit of prompt eng, Gemini also does well.

View full thread

The idea is to take raw notes and express them in several different forms, using an LLM and a template as the mechanism for summarization/transformation. With an initial version generated, hypothetically, I could make updates to the existing document with regenerating the entire document.

The former approach is faster and cheaper, but as mentioned, not always reliably for new context that shows up in the middle of the window. With an append only approach, maybe this could be viable. As a generic approach, maybe not right now.

I’ve been experimenting with feeding around 200 log posts from my site into an LLM to summary, following a certain template structure. The result have been pretty promising with Haiku and Sonnet. With a bit of prompt eng, Gemini also does well.

I ran into problems when trying to make incremental updates using an aider style string replace. Sonnet follows the instructions but seems to lose track of context in the middle. Also, doing this with Claude isn’t cheap. Gemini is about an order of magnitude less expensive than Haiku.

All models I tried seem to struggle with recall for context in the middle. This matters for my task because I am aiming to summarize all the notes for all the months in one inference. I could do month-by-month summarization separately but it undermines the proof of concept I am attempting.

I open sourced my app, Delta, a UX for local-first conversation branching with LLMs. It let's you "rewind" and take conversations in different directions. You can also swap models, temperature and top_p to see how the model responds changes you make and support images. github.com/danielcorin/...

Currently playing around with a prompt+sketch as an input to an image-to-image model. It feels like cheating but it's incredibly effective for translating initial ideas out of your head.

Still pretty rough but got auto-color palette extraction working (the second row of colors). The algorithm works by sampling pixels, quantizing to 32-step RGB buckets, then picking most frequent colors that are sufficiently different (>100 RGB distance). Claude wrote it.