AI Keeps Forgetting? How to Manage Context in Coding Tools (Cursor, Claude, Windsurf) Vibing with AI Code, Episode 2: Brendan & Baird Brendan: Hey, how's it going? Baird: Good. How you doing? Brendan: Good. Yeah. Been been busy the last few weeks. A lot going on, as always in the AI world, so, uh, Baird: same here. Brendan: yeah. Yeah, definitely. Um, I know there's so many things we could talk about, but I think, why don't we start with, um, something that's been an issue, I guess with just AI coding for a long time, and it seems to be getting better, but it's still got things, it is still something you gotta look out for, you know, it's just the context problem. How do you. Handle the context window that the AI has to, you know, keep up with your, what, what you're asking it to do and, and stuff like that. So, uh, and before we even just dive in a little bit, I, I, it reminds me of a, a tweet I saw yesterday. And I don't have all the context, no pun intended, but, but it was a, an image from a developer that I follow and the image was, I forget what it said specifically, but it was like the, the progress bar of the context window. It was like 10% left. And I wish I remember off the, the link to the tweet, but the, the, you know, the. Caption basically was something like, the fund's gonna end soon, or something like that? But, but yeah. What, what are your thoughts on that? Like what, what are things you've done, you know, to either help with it or like, how, how has it caused problems for you? Those sorts of things. Baird: Yeah, I Brendan: I. Baird: it really, and I think it's even more than coding, like context is such a huge thing in AI in general. It's like more people and myself included, have worked with it, you just realize that AI is capable of a lot, but if you don't give it the right context, it just uses whatever is, you know, the medium of. The data set that it was trained on. So like you're gonna get average stuff if you don't give it context that can make it specific to what you want it to do. And you know, me personally, I've learned a lot to like. Give very detailed instruction like, you know, I use Windsurf typically for my id. So there's context built into that, but it's still not even enough because it doesn't know like what's the right context. Like that's the other problem is that if you just throw everything at it, AI also struggles with like, it looks at the beginning and ending of the context. You give it not every single piece of it. So trying to manage that is like you give it that. Greater overarching context, but then you have to give it more detailed. Like, look here, here and here to like really try to help narrow it in on what you want it to versus like, I mean, letting an AI bot. Have free reign is like the worst thing you can do because Brendan: Yeah. Baird: they don't, really like you or want to work very well with you. They have their own opinions and so like learning that and learning how to like give it parameters inside of that context even has been very helpful from my perspective. Brendan: Yeah, that, that, I mean, that's something I've run into so many times, what you just talked about, about how it's like, it pays attention to the beginning and like the most recent post, and it, it's like it forgets. So much stuff in the middle, and I feel like I'm constantly, you know, generally I'm using Cursor and it's agent and generally it's like, you know, you're, I dunno, maybe only like four or five prompts in, so it doesn't seem like it should have forgotten and it's forgetting something that I told it maybe too prompt ago about, you know, I don't have a good example, but let's just say I, I told it something specific about I want to do it. This way, I want to, I dunno, we, we will use a simple example. I want single quotes instead of double quotes or something like that. And then two prompts later, it's like all the code, it's writing is not using what I asked for in that case. And it, it's crazy how quickly that happens and you gotta stay on top of it. And I'm constantly like, did you forget we talked about this? Baird: Oh yeah, no, it, it happens too. Like it's really bad if you're a front end developer as well because you'll give it parameters like, you know, go look at how I've been styling this thing and style everything else like it, and it'll do it for that prompt. Brendan: Yep. Baird: again, like one or two prompts later, all of a sudden it's like back to Tailwind Blue, like for everything it does. And it's like, no, no, you gotta go back and do it. And of the things. I've played with and have had some success with is after you go through a chat, like I usually try to keep them short and like really the point of Brendan: Same here. Yep. Baird: But what Brendan: Yep. Baird: done, and I've done it a little bit more in like Claude, you know, it's chat interface versus windsurf but I think you Brendan: Mm-hmm. Baird: it in windsurf or a cursor as well, is like after you get through. a short prompt, have it generate a summary of the important things from what you just talked about. And Brendan: Yep. Baird: you can drop that in like a project in Claude or in your like global context in your IDE. I find that helps a little bit of like giving it, because it's not just like the chat thread that it's looking at, it's Brendan: Mm-hmm. Baird: It has, you know, one store for that global context and then the chat thread, and it can help keep it a little more honest. Like it, it is not perfect. There's still those issues, but it can help at least sometimes get better results of, it remembers the important things because there's not as much noise of like all of a, chat window on multiple things that trying to figure out. Brendan: Yep. Yeah, I've done something not a, I've done that. specific thing, but I've also done something else in some of my more recent projects, which is I create a I I call it Current MD Baird: sure. Brendan: like that. You know, it is just a markdown file, but I always start the project and I remind it every single time, like we're looking at this. For direction. Baird: sure. Brendan: this is your, your goal essentially where we want to get to. And that does seem to help a little bit. At least it keeps it on task with that. And so I can go, the problem though is like, to your point, like I like to keep, uh, quick, you know, short prompts too. I wanna do like one thing and then I move on to another prompt because of the whole context issue. But every time I move to that next one, if I don't do a summary, or even if I do, I still need to be like. Alright, we're still looking at Current MD Baird: Yep. Brendan: and do this, so it's like you, you're like piling up all the different things. You have to tell it over and over again and it's kind of annoying in a lot of ways. Baird: Yeah, and, and there's definitely tools. I think Windsurf recently brought something in that was kinda like it. It's really focusing on planning now. And I think you can to what you're doing with the MD files, you can have it create these documents that kind of sit in your Brendan: Yep. Baird: or you can do it manually and it really is that anchor. And I think part of it too though, is. If you set up the defaults at the top level, like it can definitely help. Like I've, me personally, the one I've seen help, and it isn't even on the code side, it's on just the chat bot side, is my instructions. I've told Claude to push back on pretty much everything I, I put Brendan: Mm-hmm. Baird: because, you know, like OpenAI has had really, you know, bad problems of like the sick fancy of the bot where it's like everything you do is amazing. And Brendan: Yep. Baird: I I kind of got to a point where I'm just like. But it's not like, I know this is not amazing. And so I've put specifically, like one of the most important prompts I put in, like the personality is pushback. On Brendan: Yep. Baird: And it does, like, I, it calls me out every time I'm like thinking about something. It's like, but I wanna push back. You, you know, you're kind of full of it and it's like, yeah, I, I, I kind of am. And, and so I, you can do similar things in IDs as well, and I haven't played as much with it, but I kind of need to push into that, where it is like setting those standards at the top level to see if it, like, will adhere to it a little bit better than it does. And you know, it's interesting too because. You know, Claude, or you know, open, I have a chat, GPT. They've got their context models and then the IDs have like a different type of context model for like Brendan: Yep. Baird: they manage that global state. So you'll get different results, but it's, is interesting how context is so much of the job now, you know, like writing the code isn't actually that. Challenging because of Brendan: Mm-hmm. Baird: but like you have to stay on top of it. You have to make sure that you're like curating that context at multiple levels and like, you can't, it, it is not the, type in a prompt and I'm done because. never gonna be consistent, you know, it's, it Brendan: Right. Baird: have the way to take in everything you've done your entire, you know, style of writing code and your code base and all of that. Like, it, it just struggles with that. so the job is moving to do you manage the bot? How do you keep it on target? Brendan: Yeah. Yeah. And that jives with something else I saw recently, which, you know, there's varying opinions out there, like, AI is gonna take over the world, or AI is not gonna take over all the jobs, but the jobs are gonna shift. And that's kinda the view of this take was. You know, software engineers are gonna basically be, there's lots of different terms, and I forget what this specifically used, but it was something along the lines of what you just described. You're gonna have to learn to not just prompt it, but you're also gonna need to just, you know, make sure it's doing the right things and reviewing the code and a lot less writing of the code. And that's kind of where I feel like things are, going. I, I've yet to see anything besides a prototype that is vibe coded in a way that. At least I would ever put into production. You know, Baird: sure. Brendan: people are, we talked about that in our, in our last episode. Baird: Yeah. Brendan: We don't need to dive too much into that, but I, I think what you were talking about there, you know, is more or less where I think things are going and you know, that, that's something that I've been doing recently. I've, I've already mentioned earlier, like I use Cursor a lot primarily, but I have installed Claude Code recently and what I've started with, I haven't used it a ton yet, is I've moved to using. Cursor still, but I use Claude Code in the terminal and so instead of using the Cursor agent, I'm using Claude Code basically to do it. And it, the benefit there, like I am used to working in the terminal. I used to use Vim all the time, and for those who don't know, that's a terminal based editor that, you know, I, I don't need to get into all the specifics, but for me it was like a, at the time before AI even existed or even was a thing, it was very efficient. And so it's, it's nice to be in the terminal, but there's also something about like the way Claude Code works and having been in cursor that this still works the way Cursor does. Except it, you know, it's a slight variation of it And, you know, I don't have a whole lot to say yet about Claude Code versus just normal cursor or windsurf. So maybe we'll get to more of that at some point when I get to use it some more. But, you know, it, it it, back to the context stuff. One of the things that Claude Code did initially every, and I've used it for I think two, uh, different, uh, repositories, two different projects so far, and the first thing it does is it has this, a knit command. And you hit that and it basically generates a file that tells it, it decides or, or figures out or. What is this project all about? Baird: Sure. Brendan: it tries to get a context right there to say, okay, I'm working on, in this case it was like rail seven and it's using tailwind and like all the different things that it's using that it can tell and it's pretty good. It's not perfect. 'cause in my case, I'm always using Docker and I have all the Docker files in there, but it's not necessarily picking up that, oh. All of your Docker commands that you're gonna need are like important because that's another thing. Going back to the whole context that I always run, into, because I use Docker, is that every time, if I forget and I don't tell it, Hey, okay, we're using Docker, so we need to run, you know, docker commands. It will get to the point, and this is the cursor agent, not Claude Code, but the cursor agent would get to the point where it does its thing and it's like, okay, now let's run the server, or let's run. Any kind of command. And it does, it gives me the, the non docker version. And so that's another like annoyance where I'm, I'm hoping if I modify this Claude Code MD file or whatever it's called, I think it's CLA MD maybe, but I'm hoping that I can modify that in a way that it knows every time. Like, okay, we're using Docker, we need to make Sure. we're using these commands. So I haven't even tested that yet, but that's another context thing that, you know, is, is goes hand in hand with what we've been talking about. Baird: No, and, and it's interesting, you know, on that topic how things are starting to evolve and, and I think there's a couple different paths that it could take where like Claude Code could, can be your editor in the terminal and then you use Cursor or Windsurf as your general id, but I think. Specialized tools might actually be more of a thing. And one of the things I have seen, like with Windsurf is they just recently introduced a browser essentially that is a Chrome spinoff, but it boots up in the ID then the agent actually has access into like the console and you can take screenshots and actually like look at things and then pull things back into. The agent. I think there's a world where it starts to, you know, break out of the ID as just like your only tool. And like these things start to do different things. But there's another interesting shift that I'm seeing and like Cursor, I don't, I don't know if you heard about it, but like all the pricing on Cursor has changed recently and like. Brendan: I actually hadn't, no, I haven't been paying attention. Baird: Yeah, so like EE, everything had to been like you get credits and you use credits per prompt or per Brendan: Which is what I'm used to using. Yep, exactly. Okay. Baird: so cursor just changed to essentially like, I think it's like work units essentially where it's like CPU time that you're getting Brendan: Okay. Baird: versus just like prompts and people are upset about it. And Brendan: Mm-hmm. Baird: I noticed with Windsurf, and a lot of this is because the models are. So rapidly changing and they went from being like they're all pretty much the same model to like thinking models are now way more expensive than typical, you know, non reasoning models and things like that. And so pricing is changing and so like the flat fee is changing. And so now you have like Claude Code, you tap into an API with clo. So you're paying for the usage that way. Brendan: Yep. Baird: where you're kinda starting to see, you know, these editors go as well. you also see things like Windsurf lost access to Claude Sonnet for a while because, you know, they were almost bought by open ai. So all of a sudden clouds or you know, philanthropics like, well, we're not gonna let you use our model if you're gonna be owned by open ai. And so, Brendan: Right. Baird: I, I think we're getting into a world where this is gonna change. Like this was the first wave with Windsurf, with Claude. Or Claude, sorry, cursor. then Claude Code kind of came along and that's a different aspect to it. And like there's just a lot of shifting that I'm seeing happening. And to your point, it's gonna change how we approach this and evolve how we approach this. And I think it'll make some things harder. Like going back to the original thing we were talking about, like. Context, how do you manage context If you have to use multiple tools to do it? Like is your code base still the place where you can keep it? And maybe like the files is the answer here, but like I really see that things are gonna start shifting in the landscape of and AI pretty rapidly here. Brendan: It's also interesting too to me, and obviously I mentioned I use. Claude Code in Cursor and, and for what it's worth, there is like a extension. So it, I didn't use that, but it, it picks it up automatically and stuff. So like, clearly they're realizing people are doing this and gonna do it, but if I wasn't using Cursor and I was just using Claude Code in the, terminal. You know, that while it has the, the ability to vibe, code anything, just like, you know, people are doing with lovable and all those beautiful ui, you know, uh, tools. This is like maybe the most powerful one right now. I don't know. I haven't compared them, but I, I hear a lot about how powerful it is and that's kind of what's drawing me to it. Plus, I'm using Anthropic's Claude anyways in Cursor, Baird: Sure. Brendan: very interesting to see how things are kinda like shifting towards more. Traditional developer setup back in the terminal for Claude Code. You know, it doesn't have its own UI besides Terminal ui. And I feel like there's other products that are kind of shifting in. that way as well. And I guess all my point at the moment is really just, it's started out where, you know, everything was in. Chatbots in the web browser mostly, or like a local desktop thing. And it was very user friendly for anyone to come and do things. But now, at least with Claude Code and, you know, maybe a couple other tools that we've seen recently, it's starting to shift a little bit and it'll be interesting to see, do we keep going in that direction or is this just like a, a stepping stone? Baird: No, I, I, I think it makes a lot of sense though, because Brendan: I. Baird: look at the greater ai, you know, use case GPT came on the scene and everybody's like, okay, now every interface has to be a chat bot. Like it is gotta be a chat. Everything's gotta be chat. And like, I don't know personally, my mind's always been like, while chat is cool, chat is so, and like, it's expanded significantly, don't get me wrong, but you're still stuck in that window. And Brendan: Yep. Baird: want to do something over here, but like all my stuff is sitting in this window and like bringing ChatGPT into an IDE that can then work with your files. Like that's helped, but it's still like I'm chatting and I've gotta talk a lot to get things done. And I, I think what we're seeing to your point is, and I think this is gonna happen a lot of places, is like how can we use the AI to start to just like. Be a tool that isn't just like something you chat with completely, but like these things can start baking in of prompts on the backend, but you're just interacting with it in more natural ways of like, how would I use this application? And the AI is just in the background doing the, thing to make it easier, to make it more powerful, to make it more useful. But your interface be more of what you used to use or something completely new. Brendan: Mm-hmm. Baird: the, I only work with AI through chat and I think that's a, a good way to go because like I said, like chat has its place and can do some really cool things and has expanded significantly. But I still feel so often where it's like there's gotta be a better way. There's gotta be an easier way to interact with AI and take advantage of AI that isn't just chat interface like they have their place, but I think there's more that can be done there. Brendan: Yeah. Yeah. You also touched on something else that I, I've seen recently is, uh, uh, I think it was called Vibe Kanban. I haven't do dove into it at all, but it, it's almost like a, a different chat interface. 'cause you, you basically have your Kanban board, you know, and for those who aren't familiar, it's basically just like you got your swim lanes and you can put in your new card to say, okay, this is the ticket I wanna work on And I watched a little video on it. That's about as far as I got. But basically it's like. Instead of a chat window, you put all the context in your card like you normally would anyways if you're doing professional development anyways. And then this tool, you just hit start and then it goes and does kinda what you described. It goes in the background. It invokes the the AI agent to work on all the stuff and then it, you know it from what I saw anyways, it was like pulling the cards through the different processes with you checking in every time, which is a really. Standard concept in, in, uh, you know, software development that, you know, most five coders are probably not familiar with if you haven't done any software development. But it's a, a, an, it's kind of a cool thing. I think it tied in with what you were just talking there about not always using a chat window, uh, to, to do this stuff. Baird: Yeah, and I think, I mean, that's the perfect point of like giving a place where you can. Spin off your ai, start your AI to do something interesting, but it also gives it that basis of context. Because if you have all of the like ticket of what you need to work on or task that you wanna do, you know what's interesting is that even if it doesn't do everything for you, it can also help like the boilerplate problem. You know, like how Brendan: Right. Baird: Like how do I plan this? How do I tackle this? Because that's where productivity is. So. Hard, you know, it's, it's not necessarily doing the thing, it's like getting started with the thing. And Brendan: Yep. Baird: like, having your AI do something like that is, is such a good use case for it. And I think from an age, like, 'cause that's more like a, the genic AI at that point where it's like, it's starting to automate things. But I think having the human in the loop is so important. Like, and, and this is where like I struggle with. Vibe, coding, coding is so much you're trying to take the human out of it. Like you give it the Brendan: Right. Baird: all the things for you, and like, it's cool. It, it, it feels like magic, you know? Like for somebody that's never built an application before coming in, typing in what they want and getting it immediately Like a, that's a dopamine rush that's like, this is awesome. I did something amazing in Brendan: Yep. Baird: like whatever. But is also that magic feeling. And like anything, when it feels magical, it's actually dangerous 'cause you dunno what's going on behind the scenes. And so Brendan: Yep. Baird: if it never checks in with you, if it never like tells you, okay, I've done this, check it over. And even if it does, like you don't even know what you're looking for. Like, Brendan: Yep. Baird: really really dangerous. And that's why these tools are so powerful for people that. the field, like they know how to program, they know how to debug because that's the other thing that I've heard so many times is like that vibe code, because we all know anybody that's used AI that's ever actually programmed before create books. like just last night I was multiple chat iterations. I had something generate for me. I looked at it and I'm like, you didn't even create the variable that's right here for me. And like, I was like, oh yeah, thanks for catching that And it is like, that doesn't know, wouldn't even think about it. They'd run it and be like, what's going on here? And so, you know, to wrap it all up and kind of a, a bow is like having context helps to create better things. But as a human, you have to have context to be able to make sure what it's creating is good, and you know, actually push it into something that's, gonna be useful for you, rather than just creating stuff that looks like magic but falls apart as soon as you put any pressure on it Brendan: Yeah. Yeah, that's, that's well put. And that's probably a good place to stop on that topic. So yeah, let's, let's move on to our, I guess our last segment here of just, uh, you know, what are some things we're interested in around AI and AI coding, or maybe it's just general AI stuff. Uh, you wanna go first? Baird: Sure. Yeah. The, the one thing that I just ran into, 'cause I've been looking around with all of the different, like we were just talking about like the pricing changes, the cursor and all the stuff going on with Windsurf. I ran into Kiro, which is another IDE, which, you know, I haven't played with it yet. So this is something I want to kind of play with over the next couple weeks here. But interesting because Kiro, from what I can tell, is created by Amazon, but it has a little bit different approach to it. Like it. tries to create specs and then create code rather than just like diving into, you know, creating straight away, which I know Windsurf is. Introduce planning, which is kinda like that. But the other thing that I'm curious to see about is because it's owned by Amazon, Amazon's put a ton of money into Claude. And so I'm curious to see like is all of a sudden Claude gonna start shifting here when Claude codes start shifting in this direction like this? This is the other piece to all of this that I'm to see how it plays out of like all the big. Companies have stakes in these things, in the models, like does it start to get siloed and how does that change the, the landscape? Brendan: Yeah, well, I'll just touch on, uh, you know, I, I had just seen something about Kiro, but I hadn't really looked into it, so that's, that's cool to hear. And I, I'm definitely gonna take a look at that as well. You know, um, I've kind of touched on the two things that are top of mind for me still right now, that. that vibe Kanban thing seems pretty cool. and I think maybe power or putting that together with Claude Code, and again, I haven't done a whole lot with it yet, but I, want to keep exploring that. Um, but, but the other thing that I'll touch on, and I I, I touched on this last episode a little bit too, is just like the swarms, that is another option with Claude. And I don't even know, I haven't looked to see if like OpenAI or anybody else has 'em. I'm sure they, they do in some capacity, but. I think that specifically the Rails swarms, that was a gem that just came out. Or I don't even, maybe a gem's not even the right way to put it, but a library anyways, that helps you do that with Rails Apps, and again, that's what I primarily program in is Rails. I'd love to just, you know, even give it a, a vibe coating thing, like see how far it can get, see how much better it can be at that sort of thing. I know that one, shouting something is still gonna be really hard because you're still gonna have to check in like all the things we've talked about. But yeah, those are the things that I've been thinking about or at least been interested in here in the last, uh, You know, week or so. But, uh, yeah. Yeah, I think. You and I have talked about this offline, even pre-show a little bit just about like, there's certainly things that we both wanna be doing with AI and AI coding that we haven't even had a chance to. So I think those are all things we don't have enough to say about 'em right now, but things that we can definitely talk about in the future and you know, I think these will definitely, you know, all the things we just talked about here will definitely play into that stuff too. So, Baird: Yeah, no, Brendan: yeah. Baird: a place I I wanna explore a little bit too. I mean, the, the vi pan bin sounds pretty interesting. Like, it, it, there's some ideas I've had around similar type stuff, so I'm gonna have to dive into that a little bit too. Brendan: Yeah, and I'll put that in the show notes. Um, you know, on the, the audio version we'll have in the show notes on the YouTube channel. It should be down below. So, um, yeah, I think that's probably a good place to wrap it up. And, uh, yeah, why don't you like and subscribe if you're enjoying what we're putting out here and, uh, we'll, uh. Be back with the next one soon.