start	end	text
240	2100	This video will teach you codex.
2340	4260	I'll go through all of the important features,
4260	7600	show you how to set it up and install it and assume no prior knowledge.
7600	10440	So even if you're a complete beginner, you'll be able to follow along.
10740	14340	Now I'm going to be covering things like computer use or browser control.
14340	17440	I'm going to show you how to set up for coding model selection,
17440	19860	all of the different commands like slash goal.
19960	22860	And a lot of the new features that I haven't seen many people cover.
23140	25560	So with that said, stick around, let's get into it.
25560	27060	And let me teach you codex.
27240	29340	So let's start by discussing what codex is.
29340	32340	We'll look at how we can use it because there's actually many different ways.
32340	34600	And then I'll start going through all of the different features.
34720	38300	There'll be timestamps down below in case you want to skip forward and keep in mind,
38380	40420	I like to make things really thorough and detailed.
40520	43560	So if you feel like I'm going too slow, fast forward to the next section.
44100	44320	Okay.
44500	46040	So first, what is Codex?
46320	50320	Well, Codex is essentially OpenAI's answer to tools like Claude Code.
50560	52980	It's actually much more involved than Claude Code.
52980	57200	I would say it has a lot more features and a lot of people don't know about what you can do with it.
57200	61420	Now, the basics is that you can use it to write code because it will give you access to their top
61420	67960	bottles like GPT 5.5. However, you can also use it to control your computer, to automate tasks,
67960	72160	to, you know, perform something repetitive for you. And you can even do something like tell it
72160	76840	to play a song on Spotify for you. And it can go and do that by controlling your computer.
77140	80580	So there's a lot of cool features that are not just related to coding. I'm going to try to cover
80580	85600	all of those in this video. So what I want to do is quickly cover how you can use codex because
85600	88900	Cause there's a lot of different ways and open AI has been very confusing with
88900	92840	the naming of codecs because they had models called codecs, like their actual
92840	93460	LLMs.
93720	97540	Now they have the tool called codecs and you can use it in like many
97540	98420	different fashions.
98680	102660	So for this video, we're going to be using the standalone desktop application.
103000	105800	The way this works is you download it and install it on your computer.
105920	109140	You can get it for windows Mac, and then they don't have it for Linux right now.
109140	110140	So just windows are back.
110440	113560	Now you'll sign into this, using your chat GPT subscription.
113560	114380	You can use it.
114380	117040	I believe as low as $20 per month on the plus plan.
117220	119860	Just keep in mind, I do have the $200 per month plan.
119860	122260	So my usage limits will be significantly higher.
122560	124460	And the limits are typically very generous.
124460	127200	You're probably going to get five or 10 times the amount of usage
127380	129460	than you would compared to something like Claude code.
129580	132780	So I wouldn't be too concerned with ripping through it unless you use
132960	135200	the highest end models and you're running it 24 seven.
135260	137580	Now you can also use this with an open AI API key.
137620	140920	I definitely do not recommend that because that's going to be very expensive.
141220	145560	So first step, if you don't already download and install codex, I'll leave a link to it in the
145560	150560	description, sign in with your chat GPT account, then you're good to go. Now, as well as the
150560	155340	desktop app, which again is what we're going to be using. They also have an IDE extension. You can
155340	160080	install this in the popular editors like cursor, visual studio code, and windsurf, and have access
160080	164780	to the same codex interface inside of that editor. If you're a developer, you may want to do that.
164820	169660	We also have CLI. Now this is a command line interface, more familiar to something like
169660	173240	cloud code where you're not in kind of a nice graphical user interface, which
173240	175960	you'll see in a minute, but the advantage here is that you can run this on
175960	179320	something like Linux or server, and you can have this as a remote machine.
179480	181280	That's running 24 seven, same thing.
181280	182540	You can sign in with your account.
182840	186180	And then we have the cloud version, which is running directly in your browser.
186340	189460	It's better if you can use the desktop version, but if you want to do it from
189460	192120	the browser on your phone or something, you can do that.
192340	192600	Okay.
192600	194320	So those are the surfaces for codex.
194540	198000	Again, what we want to do is download the desktop application, which is where
198000	199040	we're going to be working.
199040	200600	And now let's open up that app.
200760	202740	So I've just opened up the desktop application,
202740	204100	which is where we're going to be working
204100	206000	and where I recommend you use Codex
206000	207680	because that's the most number of features.
207820	209860	Now let's start by going through the user interface.
209960	212720	You can understand what all of these buttons actually do.
212840	214780	And then I promise we'll go through all of the features.
215000	216920	So here you have your main chat window.
217120	218760	There's a few things you want to pay attention to,
218800	220680	like the model selector, which we'll look at in a minute,
221000	222960	the voice dictation in case you want to use that,
223240	224220	the approval modes.
224220	226860	So ask for approval, approve for me or full access,
226860	231600	and then being able to add different skills, context. And then if you want, you can actually
231600	235700	run commands by using this slash. So if you do forward slash, you'll be able to see a list of
235700	239620	all of the stuff available, which will be going through. You also have the ability to organize
239620	244280	different chats into projects. So you can see, I have a few projects here. You can make a new one,
244440	247920	but we'll look at that in a few minutes. Now from the right hand side, you'll also notice that you
247920	252220	have these toggleable bars. So if you click on the right, it's going to show you a browser and
252220	256000	a terminal that's because codecs can automatically control a browser for you
256000	257380	and test your applications.
257520	261360	And then you can also toggle up the terminal or the shell, which again,
261480	263240	codecs can control and use for you.
263280	266400	You typically don't need to do this, but I'm just showing you those views exist
266400	267620	from the left-hand side.
267620	270800	You can also toggle this sidebar where you have some of the important,
270800	272640	I don't know, buttons or views.
272880	276260	And if you want to access the settings menu, you can click on your profile,
276380	279380	can go to profile or two settings for settings.
279380	281120	If you are someone who's not going to do any coding,
281120	284660	you could switch this over to the everyday work mode. So it's going to be a little bit less
284660	288440	technical, but for most of us, we're going to want to stay here where we have access to the browser,
288540	292480	the terminal and some other features. There's a ton of settings. Feel free to look through these
292480	296840	and change any of them if you want, but again, I'll go through them one by one. And then last
296840	301300	thing, if you go and look at usage and billing, you'll be able to see your usage, the plan that
301300	305800	you're currently on. If you have any balance or anything, again, these are very generous limits.
305840	309140	It's very unlikely that you're going to hit them, especially if you're doing something somewhat
309140	312680	normal. So I wouldn't stress out about it too much. Okay. So now that we've gone through that,
312740	316580	let's start looking at the models. Let's start running a few chats and setting up some plugins
316580	320840	so I can show you things like the computer control, which is super cool. But first,
320920	326780	just a quick word from our sponsor boot.dev. Now this is one of the best learning platforms out
326780	330780	there and actually a long-term partner of this channel. Now, one of the biggest problems that
330780	336020	I see with people learning to code is boredom. They watch tutorials, copy code, feel productive
336020	337740	for a week and then they quit.
338280	340720	Now boot.dev takes a completely different approach.
340880	344880	It's very hands-on and honestly, it feels more like a game than a course.
345040	348380	Now you're learning backend development by actually building things,
348420	349760	not just watching videos.
349860	354960	You work through real challenges in Python, SQL, and go earn XP, level up,
355140	357780	fight bosses, and progress through a full backend curriculum.
357920	361100	Now it sounds a bit gimmicky, but I promise you it actually works because
361100	364040	you're doing the same kind of problem solving that you do on the job.
364460	368220	Now they also have an AI tutor called boots, which doesn't just dump answers on you.
368520	372180	It asks follow-up questions and helps you reason through problems when you get stuck,
372460	374600	which is way closer to how you actually learn.
374960	377080	Now all of the content is free to read and watch.
377280	381240	And if you want the interactive coding, the progress tracking and the AI assistance,
381600	382780	that's part of the paid plan.
383140	388120	If you want to check it out, go to boot.dev and use my code tech with Tim to get 25% off
388120	389000	your first year.
389340	391540	Big thanks to boot.dev for sponsoring this video.
391660	393060	Now let's get back into it.
393340	395920	So like I was saying, let's have a look at the model selection.
395940	397380	Now, for some reason, you don't see this view.
397380	400060	You can always just press a new shot and it will bring this up.
400480	403560	Now from here, if you go to model selector, you're going to see that you have a
403560	406880	reasoning level, light, medium, high, and extra high.
407240	410700	Now, of course you want to use the best reasoning whenever you possibly can,
410820	414000	but keep in mind that this is going to take significantly longer.
414220	418000	So the reasoning can kind of come down to how long this is going to take.
418160	421580	Of course, the higher reasoning, the better responses and results that you're
421580	426460	typically going to get, but it can increase the time by like four or five, sometimes 10 X.
426600	431380	I've had tasks here taking a 30 minutes to run in extra high reasoning. So if you want something
431380	436040	fast, if you're asking a quick question, you don't need super high reasoning and you can put this in
436040	441960	light or medium mode. Now, when it comes to the model itself, you have a few options. GPT 5.5 is
441960	445720	kind of the best one, you know, the frontier coding model, the one you're going to want to
445720	451320	use for pretty much everything. GPT 5.4 is just the generation before that, that has kind of
451320	453660	cheaper usage limits. I would never use this one.
453980	458880	GPT 5.4 mini. This can be used for small, fast, kind of efficient things where
458880	462340	you're asking a question or you just want, you know, quick UI change or something.
462600	467220	And then 5.3 codec spark is just an extremely fast model that you use again,
467220	470200	for very minor things that don't require a lot of intelligence.
470420	474020	And specifically when you're running out of the usage on GPT 5.5.
474260	479420	So for 99% of you, you just keep GPT 5.5 on probably throw it in medium reasoning.
479600	480000	If you have
480000	482000	If you have enough credits, you can turn on this fast mode.
482000	483000	So we'll run faster.
483000	484840	I pretty much always leave that on.
484840	488820	And then if you start running out of the usage, you can switch to some of these other models.
488820	492540	You can change the speed back to default and you can adjust the reasoning, but most of
492540	494600	the time, 5.5 medium.
494600	497400	is what you're going to keep it in. And if you're doing something more complicated,
497680	501680	switch up the reasoning level here to high or extra high, you can play around with it,
501680	504640	but that's pretty much all you need to know. Okay. So of course we're going to use this.
504640	507720	I'm going to show you a bunch of prompts, but I want to show you how to set this up
507720	510240	so we can do some really interesting things with codex.
510540	512840	So what we're going to do here is go to plugins.
513160	517800	Now this is one of my favorite features of codex is all of the plugins that it has by default.
517960	521900	And the fact that it can control your computer, control your browser, control
521900	527440	spreadsheets, access Google drive and do this in a really interactive and intuitive way. Now,
527480	531500	most of your tools like this, like cloud code, they can do the same thing, but I find codex
531500	535840	performs a lot better and it's just way easier to understand. So what we're going to want to do
535840	540440	here is go to plugins and start installing some of the ones that you see on my computer right now.
540480	545040	So the first one is computer use. If you don't already have this installed, you can install it
545040	549180	and activate it. It may ask for some permissions here, and this is going to allow you to control
549180	554420	your computer. So you can tell it to open up an application, go to your browser, access Spotify.
554620	558660	We're going to look at that in one second. Next plugin we're going to want is Chrome. So we're
558660	563560	going to want to install this Chrome plugin here and then open up this Chrome extension. Okay. This
563560	567900	codex Chrome extension, you can see, I already have mine installed here. And if I go to the view,
568000	572520	you can see we have codex and it's connected and this will allow codex to control your browser.
572520	575960	So it can open up a tab. It can search for something. It can debug your application,
575960	579220	make sure that you get that set up. Again, if you just press this open button,
579520	583960	you can install the extension and link it. Another extension that I highly recommend is GitHub.
584220	589180	If you're unfamiliar with Git and GitHub, this is essentially a version control software for code.
589300	593740	This means that you can save your changes that, you know, you can recover them later on.
593820	597280	You can store them in the clouds. You can use them from a different device and you can share
597280	601560	them with your teammates. This is a standard. Anytime you're building even a medium-sized
601560	605760	project, really any type of coding project, you should be using this. So create a free
605760	610320	GitHub account, very easy. You can just go to github.com and then you can connect your GitHub
610320	614120	account here inside of codex. So it can automatically make what's called a repository,
614120	618500	which is just storing your code effectively and upload it to the cloud. So you're not going to
618500	623260	lose it. You can access it from other devices and you can revert back in case codex makes a change.
623260	626680	It breaks, you know, whatever the version of your project is. I'm not going to be teaching
626680	631440	get in GitHub too much, but I do highly recommend that you set up that plugin. And you can see we
631440	635480	have a few other ones here, like Google drive presentations, spreadsheets, Slack, Gmail,
635480	638740	you can add as many of these as you want, but I'm going to stick with these for right now.
638900	644200	So now that we have the computer plugin installed, I want to show you how to use this. So if I go
644200	648360	and I use this at symbol, you can see that I can actually reference different applications
648360	654040	and specifically this computer, right? So from computer, what I can do is ask it to do something.
654680	660280	So let's start by doing something simple, open up notepad, close any of the existing windows that
660280	666120	are there. And then write a simple note and describe your ideal day. I know you're a computer,
666240	669620	but just come up with something. Okay. I'm just giving it kind of, you know, random prompt,
669700	673140	by the way, if you're wondering what I'm using to prompt here, I always use this tool called
673140	677940	whisper flow. Very good for voice dictation, especially in AI tools. I'll leave a link to it.
677960	681800	So you can check it out in the description. You can see that I use it a ton based on my usage.
681860	687180	Very, very good and free to try out. Okay. So let's run this and let's see what we get here.
687180	689880	And you can see that it's going to use the computer plugin and it should
689880	693780	control my computer and keep in mind that while it's controlling my computer,
693780	698160	I can still use the computer myself so I can navigate into an application.
698160	699080	I can close something.
699080	702720	I don't need to have it kind of freely using the most because it will actually
702720	704360	use its own cursor. Okay.
704380	707800	Apologies because it had a note there that I didn't want you guys to see.
707800	708940	So I had to kind of rerun this,
709080	711840	but you can see that it actually just opened up my computer here,
711840	714860	open up notepad and wrote this note inside for me. Okay.
714860	718700	So now if I want to say something, can you continue this note and make it like double
718700	719420	or triple the length?
719460	721220	Don't worry if it's unsaved, just keep writing.
721580	721840	Okay.
721840	722660	And let's hit enter.
722860	726660	And again, you'll see that we kind of get that blue hue around our computer and it's
726660	731240	able to take over and do anything that we want, which can be super useful, especially
731240	736960	for automating, kind of like testing a website, going through a form, running a task repetitively,
736980	737840	you get the idea.
737940	738660	So let's see how it works.
738660	739960	And you can see that just opened it.
740460	741840	And then did it extend the note?
742100	743020	I guess not.
743020	747480	says thinking, okay, maybe it will take over again in a second, but when it does that, you also see
747480	750860	it's kind of cursor appearing, which I think is pretty cool. Okay. So for some reason it didn't
750860	754340	keep controlling the note, but let's just do another example here. I'm going to say computer,
754800	759360	open up Spotify, find Drake's most popular song, and then tell me what it is and play it.
759940	764040	Okay. And let's just do this as an example so we can see. Okay. So it actually found that Spotify
764040	767680	wasn't installed on my computer and it's going to now do this from Chrome, which is what I was
767680	771900	trying to show. So I'm going to allow this to access my Chrome browser. Okay. So we can see
771900	774360	it opened this, it actually started playing the song. I just paused it. Cause
774360	777060	I don't want to get the copyright strike and it found the song for me. And then
777060	780120	if I go here, it says that this is the most popular one. Okay. I don't know if
780120	783000	that's true, but at least that's what it gave us. So the point is it can control
783000	786140	Chrome, it can control its own devices. So keep that in mind. That's super
786140	790080	useful, but now let's move to some more coding related features. Okay. So if
790080	793200	we're done with the current chat here, what we can do is just press new chat
793240	796700	and open up a new one here. And what I'm going to do now is I'm actually going to
796700	800480	create a new project. Now, whenever you're coding, I recommend that you make a new
800480	805280	projects. You can organize all of your chats for that specific project, and you can go back and
805280	809680	find them easily. It's not required to do this, but it's kind of a good practice. So you can see
809680	814840	that I can make new project. I can use an existing folder. So maybe I have an existing code repo that
814840	819260	I want to use. I can open that up and that's kind of what a project is. It's really just a folder
819260	823540	on your computer, or I can start one from scratch. So I'm going to start one from scratch and I'm
823540	827660	just going to call this, I don't know, chess game. And what we'll do is we'll try to make like an
827660	829940	interactive chess game here using codex.
830180	831980	So you can see that's made a new project for me.
832100	833360	It's called chess game.
833520	836240	And notice that we have a few options here for the project.
836440	839280	Now I have the ability to connect to codex web.
839480	843020	This would essentially send all of the kind of info to the cloud,
843020	844400	which is a little bit more complicated.
844660	847640	We can work locally, which just means we're working on our own computer,
847640	850840	which is what we're going to do here, or we can create something called a work
850840	853760	tree. Now we're going to look at work trees later, but essentially this is a
853760	857540	clone of this kind of project so that we can work on multiple things.
857540	859380	at the same time without having a conflict.
859620	862640	So for now, we're going to leave it in the current location that it's in.
862860	865500	You'll notice that it automatically is connecting to get.
865500	869360	So it's created a branch called main and you can make different branches
869380	871700	if you're familiar with get, but we're not going to look at that for right now.
871820	874280	I'm also just going to move this to full access mode, just so I don't
874280	875580	need to keep approving things.
875780	878140	And you can see it's pretty straightforward what you do here with those.
878340	879860	So now let me give this a simple prompt.
880180	882000	I want to create a simple chess game.
882040	886380	I want to have a backend, which is using web sockets and kind of keeping
886380	890220	track of scores and ratings and stuff in a database and people's usernames.
890520	893080	And then I want to have a front end where we can actually play this.
893340	894580	I want it to be multiplayer.
894580	897220	So I want two people to be able to play against each other.
897340	901260	We can keep it simple, have an MVP to start and then build everything out.
901600	903500	Okay. So I'm just giving it kind of, you know, prompt on what I,
903540	904780	what it is that I wanted to do.
905000	908280	I wanted to build something out here and we're going to go ahead and press enter.
908280	910060	And I just want to show you how this works. Okay.
910060	913700	So we can see here, the codex is now working. It's making multiple files.
913700	915620	We can see what it's doing and I can kind of, you know,
915620	919100	go into this and inspect the different commands, but I want to see what's actually running.
919320	924240	If I expand this right toggle, now you'll notice it is giving me a preview tab. We don't see
924240	927960	anything right now because we're just waiting for it to finish the files, but we will be able to see
927960	932320	all of the different files, code changes, and all this stuff going on here in one second.
932540	938440	And then if I go here to this kind of little, I don't know, to-do list icon, you can see that we
938440	942360	have a bunch of options. So I can change where I want it to work. I can change the branch. I can
942360	943560	commit or push directly to
943560	944980	GitHub. Now it's not giving
944980	945980	us any results because it's
945980	947320	not available online right
947320	948260	now. It's just locally on
948260	949460	our computer, but you get
949460	950300	the idea. And then we can
950300	951400	view the changes, which is
951400	952280	making right now. So we're
952280	953160	just waiting for those to
953160	954400	finish. So there's a lot
954400	955260	that will start happening
955260	956360	when you actually write
956360	957660	code. And then I can also
957660	958800	toggle open the terminal,
958800	959540	right? So I can run
959540	959980	command.
960000	961200	So I can run commands or see what's happening there.
961260	965540	Let's go back into this view and then I can open this in any of the tools
965540	966200	that are shown here.
966200	969560	So if I wanted to open this in cursor and view all of the code in IDE,
969700	971200	I can press that button and do so.
971260	973140	So let's wait a second for it to finish writing this code.
973140	975900	You can see that it's starting to show me some of the files that we have
975900	978980	inside of this folder, and then we'll review it and see what we get.
979340	981500	Okay. So it just finished the first pass here.
981500	984700	It says that it built the multiplayer chess MVP and started locally.
984900	987800	And if I press on any of the links here, you'll notice that they'll actually
987800	989440	open directly in codex.
989440	991240	So you can see that it's opened up right here.
991240	992380	We kind of have this view.
992380	994940	I can, you know, change the view, make it larger, smaller, whatever.
995180	997800	So let's give a username, maybe like Tim.
997800	999640	Okay. And join the game.
999640	1001580	And then let's try to find a game.
1001580	1001840	Okay.
1001840	1003820	And then I'm just going to open up another browser here.
1003880	1006600	So you can see, I can press this plus button, go browser.
1006840	1008260	We can actually manually type.
1008760	1010180	So localhost 3000.
1010820	1011180	Okay.
1011180	1015280	And let's see, maybe we can change this as, I don't know, Joe or something.
1015860	1016180	Okay.
1016320	1018060	Join and find a game.
1018120	1020980	And you can see that we find a game and then we can start playing.
1021100	1021720	So I don't know.
1021780	1025720	Let me try to move here and see if it moves on this side and it looks like it's working.
1025720	1027500	So let's make a move like that.
1027980	1031640	I'm not going to play the full thing out, but you guys get the idea that it is indeed
1031640	1036020	working. We have a track of all the moves. We have some leaderboard. And then maybe if I resign,
1036360	1041820	you can see now the ELO has updated and I want, so it says white wins by resignation. I mean,
1041960	1046300	pretty cool that that worked that fast. Now within this browser view, there's a few buttons
1046300	1049720	you should be aware of. So if you have a look at this right-hand side, you can see that you can
1049720	1053620	actually take a screenshot. If you do that, it will save it to the clipboard. And then you can
1053620	1058840	copy that screenshot or paste it, sorry, into the chat in case you want to capture what's going on
1058840	1062200	inside of this window rather than doing it manually. And of course, chat,
1062200	1065920	GBT and you know, GBT here can do image generation. It can view images.
1066160	1069040	So that's, I mean, should be straightforward. You also can annotate.
1069040	1073000	So if you annotate, this will allow you to select different HTML elements.
1073280	1073960	So for example,
1073960	1077280	maybe I'm going to select this and I can say something like I don't really like
1077300	1080100	this title. I think we can make it look a lot better and put a chess logo.
1080940	1081460	Okay.
1081780	1084980	And then we can go here and we can actually just update any of the values
1084980	1086220	directly on screen.
1086740	1088860	I'm not going to do that because I would prefer just to prompt it,
1089100	1090140	but I'm just going to run that.
1090520	1093980	You can see, we now have an annotation in chat and I can start adding other
1093980	1098520	annotations. So maybe I'm going to say, can we change the color of the board or
1098520	1102180	have like a white or dark mode, or maybe change the square colors.
1102680	1104920	I'm just giving random prompts to kind of show you how this works.
1105300	1108200	And you can see we have annotations and I can say like go or something.
1108340	1111640	And now it's going to have the annotations that we made in the browser.
1111920	1115360	And it's going to make those changes, which are a lot more targeted. Okay.
1115360	1117880	So I just refreshed, cause I want to see what this was doing live.
1117880	1121280	And you can see if I go here now and I refresh, we've kind of changed
1121280	1122240	what the board looks like.
1122240	1124640	Obviously we've disconnected now we're waiting to join.
1124640	1127480	We can see we have the kind of chess icon and it's essentially
1127480	1129120	followed the annotations we asked for.
1129160	1129360	Okay.
1129360	1132720	So hopefully that gave you a bit of information on how the general kind of
1132720	1136000	coding works inside of codex is very good for me.
1136000	1139000	I really like this user interface and I like using this application.
1139200	1142000	And I mean, you can see that it gives us pretty good results,
1142000	1143720	even though I didn't do anything crazy.
1143720	1145880	So now let's move to a few more advanced features.
1146040	1148460	Let's start by having a look at some basic commands.
1148680	1153520	So commands are just anything that start with a slash, and there's a ton of built-in commands
1153520	1156540	inside of Claude code or not Claude code inside of codex.
1156620	1160360	I'm not going to go over all of them, but I'll show you a few that you should be aware of.
1160460	1164360	So first, if we do slash, we're going to want to look at status.
1164500	1166860	Now status will just show you your usage limits.
1166940	1169600	You can see that for my five hour limit, I'm at 98%.
1169600	1172220	And for my seven day limit, I'm at 99%.
1172220	1174320	It also gives me my context limit.
1174500	1176040	Now the context can be viewed
1176040	1179340	using this little kind of circular icon down here.
1179420	1181240	It won't give you a detailed breakdown,
1181240	1183500	but you'll be able to see how much you've used,
1183740	1185820	how much is left and how many tokens are there.
1185880	1187400	Now, depending on the models you're using,
1187440	1188920	the context size can change,
1189040	1191020	but this is something that's useful to be aware of
1191020	1192760	because if the context gets too large,
1192760	1194200	which means you have too many,
1194560	1197500	you know, too much conversation, history, tool calls, et cetera,
1197620	1199460	you will need to compact that.
1200100	1202120	Now there's actually a command that can do this for you.
1202220	1203840	It's called slash compact.
1204000	1208320	Now what slash compact will do is it will take everything that you have in your current
1208320	1209560	conversation history.
1209660	1213720	So all of the tool calls, all of the code, anything that it's understood in this whole
1213720	1218480	conversation that we've had, and it will generate a summary of that and then add that to kind
1218480	1221040	of a new fresh conversation that you'll start.
1221160	1224780	So you'll notice that after I did that, we now, if we look at the, uh, what is it?
1224840	1227100	Context use here, we've only used 4%.
1227100	1228980	So it's taken 22% there.
1228980	1232760	It's condensed it down, given us a summary, and now we can continue.
1232880	1237820	Now, it's not a great idea to compact super early because you want to use up the context window.
1238000	1244260	But as soon as you start getting to 70%, 80%, 90% context, you typically want to compact it
1244260	1248480	because you're going to get better results because as the model fills up with context,
1248480	1253600	it performs worse. This is pretty well known. Not going to go into all of the details. Just be aware
1253600	1258820	that command exists. You can use it in codex will automatically compact for you. If you're going to
1258820	1264320	go past your context. So you may want to do it at a time that you decide rather than waiting for it
1264320	1268540	to do it automatically. Now, another thing that we can do, which is sometimes useful is we can fork
1268540	1272980	this. Now you can see that if we type slash fork, it will allow us to fork this chat into a local
1272980	1278040	or new work tree, which we're going to look at effectively. What this will do is take everything
1278040	1283020	that we've done and just create a complete copy of it. So we can work in multiple agents at the
1283020	1288520	same time without them having any conflict. So they both will kind of work in their own copy of
1288520	1294040	the code base, and then they can go and kind of join everything together, fix any of the merge
1294040	1297880	conflicts. When we get to the final version, again, we'll look at fork in a minute, but that
1297880	1302560	is a command to be aware of. You have the fast mode feedback. We're not going to do that. A knit
1302560	1306840	goal and some other kind of modes that we'll look at here in a second, a few last things to be aware
1306840	1310940	of. You can also pin chats. So if we want this chat to be available, we can pin it. And then we
1310940	1315340	can create new chats inside of the same projects. You can see it's in chess game here, and we can
1315340	1319500	decide how we want to work and just have another agent either running at the same time or in a new
1319500	1323560	chat. If we want to ask for something different and kind of forget the previous conversation
1323560	1329620	history we had here. Anyways, let's go to a new chat. Now we're inside of chess game and let's
1329620	1335920	use a new mode that we haven't seen yet, which is plan. So if we use slash plan, we can enable plan
1335920	1340920	mode. You'll see that it's here. And now with plan mode, what we can do is we can ask this something
1340920	1345660	a little bit more detailed. We can describe what we want and codex will prompt us with different
1345660	1350860	questions and kind of clarifying details before it goes and executes the plan pretty straightforward,
1350860	1355540	but typically you want to make a plan before you do something too complex. So really for our chess
1355540	1360140	game, we should have started in plan mode, built the plan and then executed. I was just saving it
1360140	1364760	for later because it's a little bit more complex. So now maybe I want to expand this chess game.
1364880	1369280	I want to have puzzles. I want to have a leaderboard. I want to have maybe a big UI. I want
1369280	1370300	to have whatever accounts.
1370540	1372160	So let's start generating a plan for that.
1372700	1374680	I want to expand our chess game.
1374740	1379540	I want to have a better landing page so that a user can see their stats and they
1379540	1383440	have the ability to either play a game or play a puzzle or go to like a practice
1383440	1386460	board. I want to generate a few different game modes, and I want to really
1386460	1389680	polish this up and make it kind of like a chess.com clone.
1389920	1391760	Let's start with just the MVP features.
1391760	1393100	Can you generate a plan for this?
1393160	1394540	Ask me any questions you need to.
1395400	1395840	Okay.
1396280	1398020	So let's go here and press enter.
1398020	1402160	And because it's in plan mode, it's going to map everything out and it should start
1402160	1405860	asking us some questions and prompting us so that it can generate that for us.
1406180	1406420	Okay.
1406420	1409420	So we can see that it's now prompting us with a few questions in the bottom here.
1409420	1413920	So it says for the first MVP pass, which mode set should the landing page launch?
1414420	1418660	We can have add bot game, add time modes or core three ship, the landing page
1418660	1420080	live game, daily stuff puzzles.
1420080	1420820	Let's go with that.
1421120	1423220	How should the user stats work for an MVP?
1423420	1425680	Let's just go username profiles.
1425720	1426180	Okay.
1426180	1429080	Um, username, login, expand stats.
1429200	1429500	Okay.
1429780	1431840	How deep should the puzzle mode be an MVP?
1432480	1433500	Let's just do.
1434146	1438506	mode be an MVP? Let's just do yeah. Small bundled puzzled library that looks good. And now we continue
1438506	1442906	now, while it's doing this also mentioned that if you open up the sidebar here, you'll see a few more
1442906	1447306	options because we're in this kind of coding environment. We can now view all of the files.
1447306	1451166	If we want to look at this, we see, we have the database, we can open up the server, right?
1451186	1455346	And you can modify the code, or you can add comments directly inside of here, tag different
1455346	1455766	things.
1455886	1458066	And now you'll see that it's generating the plan.
1458186	1460446	I believe the plan will be stored in this repo.
1460486	1463666	I might just need to refresh, but we should be able to view it.
1463726	1467566	So if I want to look at the plan here, you can see, we can open it up and it gives us
1467566	1469166	everything that needs to be done.
1469506	1469866	Okay.
1469926	1472366	So I could just implement this plan, right?
1472366	1473566	And just start running with that.
1473566	1479526	But what I want to show you now is another mode that's super useful, that is going to get things
1479526	1483966	done a lot more efficiently for us without us having to keep approving things or prompting the
1483966	1490526	model multiple times. And that is called goal. So there is this slash command called slash goal.
1490946	1497346	If we use this, let me just actually type it out. What will happen is that codecs will run
1497346	1502766	until a goal is achieved. Now, this is kind of that agentic loops that you may have heard about
1502766	1507726	recently that everyone's talking about, they have that built in now. So what we can do is we can say,
1507806	1513906	Hey, here's the goal. And we just set a high level objective and codecs will keep going until the goal
1513906	1517966	is achieved. So it will plan, it will execute, and then it will review if it's achieved the goal.
1518266	1522766	And if it hasn't, it will just keep running. So it's not just going to do one pass or implement
1522766	1527946	one set of features. It will go until the goal is achieved. Now, in order to use this effectively,
1527946	1532806	you need to set a good goal and the conditions for the goal to be achieved. Now, in our case,
1532826	1537606	we already have the plan, so we can effectively just say, keep running until the entire plan is
1537606	1542326	implemented. It will then run, check if the plan is done. If it's not, it will keep going. If it
1542326	1547586	is, it will finish. So this will allow it to run for a long period of time, which also will use a
1547586	1552626	lot of usage. So keep that in mind. So for the goal, I'm going to say, okay, keep running and
1552626	1557446	implement the entire plan until the plan is fully finished. Everything is tested. Everything is
1557446	1561946	working and we are confident to deploy this again, not the best prompt in the
1561946	1565566	world, but I'm just showing you the usage here. And now that the plan is enabled,
1565626	1569826	we have goal set. I can press enter and you can see that it's going to pursue
1569826	1574206	this goal and start running and we can view, this is the goal and it's going
1574206	1577606	through all of the different steps and it will just be this infinite loop,
1577726	1581566	which can take a very long time to run. All right. So the goal has just finished.
1581566	1584146	It built this application for us. I don't know if it's fully working,
1584146	1586006	but you guys get the idea and it's done.
1586006	1590666	So now let's have a look at some more features and start going through it. Okay. So first things
1590666	1595606	first, if you look at any of these chats, you have the ability to right-click them. You can pin them,
1595726	1601806	rename them. You can also fork them into a local version or a new work tree. Now I want to really
1601806	1606986	briefly discuss what a work tree is because it's a little bit complicated and we'll save the full
1606986	1610866	usage for a part two. So let me know if you guys want to see that in the comments down below.
1611086	1615846	Now, if I try to open a new project here, right? So I've gone, sorry, new chat. Okay. So I went
1615846	1620586	new chat and then I selected chess game. And then what I did is rather than selecting work locally,
1620586	1626246	I selected new work tree. I have the ability to create a local environment. Now, the reason this
1626246	1631206	is important is that if you want to run parallel agents at the same time, they should be working
1631206	1637506	in their own copy of the repository or the project that you have. If they work on the same files,
1637626	1642026	there can be conflicts because they're touching the same information at the same time. And that's
1642026	1648526	not good. So the solution to this is a work tree. This is provided by Git. Again, it's a little bit
1648526	1652886	complicated to set up and a bit confusing to use. So I'm not going to go through all of the details,
1652886	1658406	but if you do want to run parallel agents at the same time, you have multiple tasks going,
1658706	1663006	this is what you would use. You have to configure the environment first, which you can ask codecs
1663006	1667086	to help you do. And then you can change the branches and stuff in order to work on the
1667086	1670746	different features. And now you'll have different agents because you can run multiple at the same
1670746	1674586	time working in these kinds of copies of the same repo.
1674586	1678626	Again, this is a more advanced developer feature, so I'm not going to dive into it too much.
1678626	1682986	Now, another feature that's somewhat related to this, let's go back to local copy here
1682986	1685466	is this tool called slash review.
1685646	1690346	Now, this is a code review that can automatically compare any changes that have been made in
1690346	1693606	the current session against what's in GitHub.
1693826	1694086	Okay.
1694226	1699986	So if I go to maybe this right now and I go slash review, you can see that I can review
1699986	1705226	this against a base branch. So a branch and get, if you're familiar with that or review any
1705226	1710626	uncommitted changes. So if I go slash review, right. And then uncommitted changes, it's going
1710626	1715266	to start looking at all of the changes that it made here and automatically review them to make
1715266	1720326	sure that they're good before we push them to get, or before we commit them, this is a pretty useful
1720326	1724526	feature that codex has. And this is something you should always do after you've done a large
1724526	1728526	amount of changes before you push them to remote repository. And if you don't know what that means,
1728526	1729026	Don't worry.
1729166	1731906	But if you're a developer, you'll understand the value of having a built-in
1731906	1735186	shortcut that will do all of those passes and checks for you.
1735446	1735706	Okay.
1735706	1738826	So you can see that it's done the review and it's given us some comments now.
1738826	1742266	And it said, Hey, these are errors that I found after doing the code review.
1742266	1742446	Right?
1742446	1743586	So let me go ahead and fix them.
1743826	1744086	Okay.
1744406	1747826	So let's move to the next feature, which is memory and context.
1748086	1752226	Now this is less, maybe, I don't know, demo wise and more me explaining how
1752226	1753786	this works because I want you to understand this.
1754066	1756546	So if I make a new, um, chat right here.
1756546	1756846	Okay.
1756846	1758886	And we go into this and I'm working locally.
1759046	1760126	I want you to see something.
1760666	1764746	What did I do in my last session when I was working on the chess game?
1765546	1768906	Now, the reason why I'm going to run this prompt and show you the result is that
1768906	1775146	you need to understand that by default codex doesn't remember things that you
1775146	1776286	worked on in the past.
1776646	1781266	Anytime you create a new chat, what it's doing is reviewing anything that you
1781266	1784966	have in your current repo, kind of trying to load in information and find
1784966	1789926	any context that's relevant and then give you an answer. But by default, it doesn't remember
1789926	1794346	everything that you did. So it won't have the full conversation history. It won't know maybe
1794346	1798906	preferences that you told it, and it can forget things because it doesn't remember by default.
1799166	1803346	The only reason this actually just gave me a response is because it looked inside of my,
1803466	1808446	you know, project here that I'm inside of and was able to find that information. But if I go to a
1808446	1813926	new chat and I say, and I removed the project, what did I work on for my chess game? And I just
1813926	1818266	ask it something really vague like that. It shouldn't know. At least I don't think it will
1818266	1822486	know because it's not going to have any of that context. The reason why I'm mentioning this is
1822486	1827266	that you need to understand that anytime you make a new session, you're effectively starting from
1827266	1832126	scratch and anything that you want this to know, it has to already exist as a file. It has to be
1832126	1837206	saved persistently. So codecs can read it in. And you can see here that it's not able to really
1837206	1841746	find the information very well for me here. And it has to actually go and look through the different
1841746	1846686	conversation history and threads to find this information. So it can find it, but the only
1846686	1851766	reason it can do that is because it's searching through the threads and it's very slow. And again,
1851766	1855846	it's not going to remember everything by default. The reason why I'm mentioning this is that you
1855846	1862146	can fix this problem by creating something called an agent.md file. Now, this is something that's
1862146	1868246	common in all of your code-based tools, CLI-based tools, whatever AI agents, where you can make
1868246	1874426	effectively a memory file that will always be loaded into the prompt or into the model before
1874426	1878466	you start working with it. Now, this is a really good file to create, especially when you're working
1878466	1883646	on larger projects with multiple people, because you can store preferences, different tools or
1883646	1888166	stacks that you want to use. I wouldn't say credentials, but you can store just important
1888166	1892306	info that you don't want to have to keep telling the model over and over again. So for example,
1892306	1897026	I can tell this, I'd like you to create an agents.md file with all of the conventions
1897026	1902086	support for this project, specifically the tech stack that we're using, how to run it and what
1902086	1908726	we've set up so far. Okay. And what this will do now is create a new file for us called agents.md.
1908846	1912946	You'll see it in a second. It's automatically making it starts with all capitals and it's
1912946	1914066	going to fill this file.
1914686	1920166	info that now we're never going to forget or codex will never forget because this is by default
1920166	1925146	automatically loaded into codex anytime we make a new conversation. So let's give this a second
1925146	1929786	to make the file and see what it looks like. So let's open this up and you can see that it gives
1929786	1934946	us project conventions, direction, tech stack, how to run it, et cetera. So now if we make a new
1934946	1939646	conversation, I go, what are the project conventions? It's not going to have to search
1939646	1945486	through a bunch of files to find this. It can just get it directly from its kind of system info now,
1945486	1950186	because it will have been loaded in agents.md. So you can see it just immediately gives us the
1950186	1954646	result. It doesn't need to read anything because it was already loaded in when we started the
1954646	1959946	conversation. If we look at the context, you can see the context is slightly higher usage than
1959946	1964206	normal because it started by loading that file. I hope that that makes sense to you. I know that's
1964206	1968846	not the best explanation possible, but anything that you want to be kind of long-term persistent
1968846	1974326	info that's going to be used all of the time, you want to put it in this agents.md file and tell
1974326	1979426	codecs to create that for you. And you can continually update this to improve the performance
1979426	1985586	of the model you use in a particular project. Okay. So that is kind of the agents.md and memory
1985586	1989606	info that you need to know. And the last thing we'll look at is scheduled tasks. Now I'm not
1989606	1992906	going to actually create these, but I'm just going to mention that they exist just like
1992906	1997186	cloud code or other tools that you may have used. You can create scheduled tasks that run
1997186	2002286	automatically for you, assuming your computer is on. So you can make a daily brief where every
2002286	2005946	morning it, you know, opens your computer, searches the news and gives you some info.
2005946	2009186	You can do a weekly review where it tells you all the things you worked on.
2009186	2012246	You can do project monitor where if something changes, we do this.
2012246	2016426	So if I do create via chat, for example, I can make it to set up a scheduled task
2016426	2019466	for me automatically, or I can go to templates and I can pick one.
2019466	2021886	So maybe like this, this is what I want to do.
2022106	2025206	I want to run it in, you know, this chat or in a work tree.
2025826	2028766	I want to in this project, I want it to repeat at this time.
2029386	2030746	Then this is the model that I want to use.
2030746	2031306	Okay.
2031306	2034766	So again, you can make these, you can have them set to run and you can set this up
2034766	2036886	to kind of automatically do things for you,
2036966	2039146	which is useful if you want some automations.
2039146	2040466	But for me, I don't really need any.
2040526	2041866	So I don't have those set up as of now.
2041906	2042966	And then of course you can search
2042966	2044186	through all of your chats
2044186	2045246	and a bunch of other stuff.
2045826	2047006	And we can go crazy
2047006	2050666	and we can go to, you know, add MCP servers.
2050806	2052326	We can control the browser use.
2052386	2054886	We can do computer use, hooks, connections,
2055046	2056366	get environments, work trees.
2056546	2057726	There is a lot more to go over,
2057786	2059286	but I'm going to save that for a part two.
2059386	2060726	If you guys let me know in the comments
2060726	2063166	that you want to see an advanced version of this.
2063646	2065086	That is going to wrap up this video.
2065286	2067846	That was a pretty comprehensive overview of codex.
2067926	2070766	A lot of the features, how to use it, some good demos,
2070766	2073726	setting up a lot of the important plugins at this point, you know,
2073726	2075846	probably 90% of codex.
2076046	2077686	If you want the extra 10%, let me know.
2077686	2081146	And I will happily make an advanced version for those of you that are devs
2081146	2083566	and are kind of past some of the beginner stuff that I showed here.
2083886	2084886	Anyways, I hope you enjoyed.
2084886	2088286	If you did leave a like subscribe and I will see you in the next one.
2093166	2095166	Now let's get started.
