start	end	text
266	2266	This video will teach you Codex.
2266	7533	I'll go through all of the important features, show you how to set it up and install it, and assume no prior knowledge.
7533	10533	So even if you're a complete beginner, you'll be able to follow along.
10600	14266	Now I'm going to be covering things like computer use or browser control.
14266	22966	I'm going to show you how to set it up for coding model selection, all of the different commands like slash goal, and a lot of the new features that I haven't seen many people cover.
23000	24700	So with that said, stick around.
24700	27133	Let's get into it and let me teach you Codex.
27133	29333	So let's start by discussing what Codex is.
29333	32433	We'll look at how we can use it because there's actually many different ways.
32433	34833	And then I'll start going through all of the different features.
34833	37533	There'll be timestamps down below in case you want to skip forward.
37533	40433	And keep in mind I like to make things really thorough in detailed.
40433	44400	So if you feel like I'm going to slow, fast forward to the next section okay.
44433	46266	So first what is Codex?
46266	50533	Well Codex is essentially OpenAI's answer to tools like Claude code.
50533	57266	It's actually much more involved than Claude code I would say it has a lot more features, and a lot of people don't know about what you can do with it.
57266	63700	Now, the basics is that you can use it to write code because it will give you access to their top models like GPT 5.5.
63733	70500	However, you can also use it to control your computer, to automate tasks, to perform something repetitive for you.
70500	74000	And you can even do something like tell it to play a song on Spotify for you.
74000	77000	And it can go and do that by controlling your computer.
77000	79700	So there's a lot of cool features that are not just related to coding.
79700	82100	I'm going to try to cover all of those in this video.
82100	86900	So what I want to do is quickly cover how you can use Codex, because there's a lot of different ways.
86900	93600	And OpenAI has been very confusing with the naming of Codex because they had models called Codex like their actual LLMs.
93600	98466	Now they have the tool called Codex, and you can use it in like many different fashions.
98466	102866	So for this video we're going to be using the stand alone desktop application.
102900	105833	The way this works is you download it and install it on your computer.
105833	109133	You can get it for windows, Mac and then they don't have it for Linux right now.
109133	110400	So just Windows or Mac.
110400	113666	Now you'll sign into this using your ChatGPT subscription.
113666	117133	You can use it, I believe, as low as $20 per month on the plus plan.
117133	122400	Just keep in mind I do have the $200 per month plan, so my usage limits will be significantly higher.
122433	124400	Now the limits are typically very generous.
124400	127300	You're probably going to get 5 or 10 times the amount of usage.
127300	131933	Then you would compare it to something like Claude Code, so I wouldn't be too concerned with ripping through it.
131933	135266	Unless you use the highest end models and you're running it 24 over seven.
135266	137666	Now you can also use this with an OpenAI API key.
137666	141100	I definitely do not recommend that because that's going to be very expensive.
141100	153066	So first up, if you don't want to be downloaded and installed Codex, I'll leave a link to it in the description sign in with your ChatGPT account, then you're good to go now as well as the desktop app, which again is what we're going to be using.
153100	155033	They also have an IDE extension.
155033	163100	You can install this in the popular editors like cursor, Visual Studio Code and Windsurf and have access to the same Codex interface inside of that editor.
163100	165000	If you're a developer, you may want to do that.
165000	166400	We also have CLI.
166400	174000	Now this is a command line interface more familiar to something like cloud Code, where you're not in kind of a nice graphical user interface, which you'll see in a minute.
174000	180866	But the advantage here is that you can run this on something like Linux or a server, and you can have this as a remote machine that's running 24 over seven.
180900	181299	Same thing.
181299	182533	You can sign in with your account.
182533	186233	And then we have the cloud version which is running directly in your browser.
186233	192266	It's better if you can use the desktop version, but if you want to do it from the browser on your phone or something, you can do that.
192300	194500	Okay, so those are the surfaces for Codex.
194500	199066	Again, what we want to do is download the desktop application, which is where we're going to be working.
199066	200666	And now let's open up that app.
200666	207833	So just open up the desktop application, which is where we're going to be working and where I recommend you use Codex because does the most number of features.
207866	209866	Now let's start by going through the user interface.
209866	212800	You can understand what all of these buttons actually do.
212800	215066	And then I promise we'll go through all of the features.
215066	217066	So here you have your main chat window.
217066	224233	There's a few things you want to pay attention to, like the model selector which we'll look at in a minute, the voice dictation in case you want to use that the approval modes.
224233	227000	So ask for approval approved for me or full access.
227000	230100	And then being able to add different skills context.
230100	233733	And then if you want you can actually run commands by using this slash.
233833	238066	So if you do forward slash you be able to see a list of all of this stuff available which will be going through.
238100	241466	You also have the ability to organize different chats into projects.
241466	243333	So you can see I have a few projects here.
243333	245933	You can make a new one, but we'll look at that in a few minutes.
245933	249600	Now from the right hand side you'll also notice that you have these toggle bars.
249600	252833	So if you click on the right it's going to show you a browser and a terminal.
252833	257600	That's because Codex can automatically control a browser for you and test your applications.
257600	263233	And then you can also toggle up the terminal or the shell, which again Codex can control and use for you.
263266	267533	You typically don't need to do this, but I'm just showing you those views exist from the left hand side.
267533	272900	You can also toggle this sidebar where you have some of the important I don't know, buttons or views.
273166	276433	If you want to access the settings menu, you can click on your profile.
276433	279433	You can go to profile or to settings for settings.
279433	283500	If you are someone who's not going to do any coding, you can switch this over to the everyday work mode.
283500	290200	So it's going to be a little bit less technical, but for most of us, we're going to want to stay here where we have access the browser, the terminal and some other features.
290233	291433	There's a ton of settings.
291433	294266	Feel free to look through these and change any of them if you want.
294266	296233	But again, I'll go through them one by one.
296233	303733	And then last thing, if you go and look at usage and billing, you'll be able to see your usage, the plan that you're currently on, if you have any balance or anything.
303733	305833	Again, these are very generous limits.
305833	309666	It's very unlikely that you're going to hit them, especially if you're doing something somewhat normal.
309666	311433	So I wouldn't stress out about it too much.
311433	313933	Okay, so now that we've gone through that, let's start looking at the models.
313933	320200	Let's start running a few chats and setting up some plugins so I can show you things like the computer control, which is super cool.
320200	324266	But first, just a quick word from our sponsor boot dev.
324300	329400	Now this is one of the best learning platforms out there and actually a long term partner of this channel.
329400	333266	Now, one of the biggest problems that I see with people learning to code is boredom.
333266	338333	They watch tutorials, copy code, feel productive for a week, and then they quit now.
338333	340900	But dev takes a completely different approach.
340900	345066	It's very hands on and honestly, it feels more like a game than a course.
345100	350066	Now you're learning backend development by actually building things, not just watching videos.
350066	358000	You work through real challenges in Python SQL and go earn level up five bosses and progress through a full backend curriculum.
358000	364266	Now it sounds a bit gimmicky, but I promise you it actually works because you're doing the same kind of problem solving that you do on the job.
364266	374833	Now they also have an AI tutor called boots, which doesn't just dump answers on you, it asks follow up questions and helps you reason through problems when you get stuck, which is way closer to how you actually learn.
374833	382933	Now, all of the content is free to read and watch, and if you want the interactive coding, the progress tracking, and the AI assistance, that's part of the paid plan.
383000	389233	If you want to check it out, go to dev and use my code tech with Tim to get 25% off your first year.
389266	391633	Big thanks to Boot Dev for sponsoring this video.
391633	393266	Now let's get back into it.
393266	395933	So like I was saying, let's have a look at the model selection.
395933	397400	Now, for some reason you don't see this view.
397400	400300	You can always just press a new chat and it will bring this up.
400300	407033	Now from here if you go to model selector you're going to see that you have a reasoning level light medium high and extra high.
407066	414066	Now of course you want to use the best reasoning whenever you possibly can, but keep in mind that this is going to take significantly longer.
414066	418100	So the reasoning can kind of come down to how long this is going to take.
418133	426633	Of course, the higher reasoning, the better responses and results that you're typically going to get, but it can increase the time by like 4 or 5, sometimes ten x.
426633	430800	I've had tasks here taken 30 minutes to run in extra high reasonings.
430800	431833	If you want something fast.
431833	437333	If you're asking a quick question, you don't need super high reasoning and you can put this in light or medium mode.
437400	440333	Now, when it comes to the model itself, you have a few options.
440333	443333	GPT 5.5 is kind of the best one.
443333	447500	The frontier coding model, the one you're going to want to use for pretty much everything.
447533	452400	GPT 5.4 is just the generation before that that has kind of cheaper usage limits.
452400	454627	I would never use this one.
454627	455700	GPT 5.4 mini.
455733	462400	This can be used for small, fast, kind of efficient things where you're asking a question or you just want, you know, quick UI change or something.
462400	470200	And then 5.3 Codec Spark is just an extremely fast model that you use again, for very minor things that don't require a lot of intelligence.
470200	474133	And specifically when you're running out of the usage on GPT 5.5.
474133	477600	So for 99% of you, you just keep GPT 5.5 on.
477600	479533	Probably throw it in medium reasoning.
479533	482933	If you have enough credits, you can turn on this fast mode so it'll run faster.
482933	488700	I pretty much always leave that on, and then if you start running out of the usage, you can switch to some of these other models.
488700	494300	You can change the speed back to default and you can adjust the reasoning, but most of the time 5.5 medium.
494300	495633	This is what you're going to keep it in.
495633	500666	And if you're doing something more complicated, switch up the reasoning level here to high or extra high.
500700	503400	You can play around with it, but that's pretty much all you need to know.
503400	506066	Okay, so of course we're going to use this and I'm going to show you a bunch of prompts.
506066	510433	But I want to show you how to set this up so we can do some really interesting things with Codex.
510433	513033	So what we're going to do here is go to plugins.
513033	517833	Now this is one of my favorite features of Codex is all of the plugins that it has by default.
517833	527066	And the fact that it can control your computer, control your browser, control spreadsheets, access Google Drive, and do this in a really interactive and intuitive way.
527100	534866	Now, most of your tools like this like cloud code, they can do the same thing, but I find Codex performs a lot better and it's just way easier to understand.
534866	540533	So what we're going to want to do here is go to plugins and start installing some of the ones that you see on my computer right now.
540533	542666	So the first one is computer use.
542666	545700	If you don't already have this installed, you can install it and activate it.
545700	547466	It may ask for some permissions here.
547466	549933	And this is going to allow you to control your computer.
549933	554466	So you can tell it to open up an application go to your browser, access Spotify.
554500	556233	We're going to look at that in one second.
556233	558333	Next plug in we're going to want is Chrome.
558333	560466	So we're going to want to install this Chrome plug in here.
560466	563333	And then open up this Chrome extension okay.
563333	564600	This Codex Chrome extension.
564600	566600	You can see I already have mine installed here.
566600	569900	And if I go to the view you can see we have Codex and it's connected.
569900	572533	And this will allow Codex to control your browser.
572533	573633	So it can open up a tab.
573633	574921	It can search for something.
574921	576300	It can debug your application.
576300	577866	Make sure that you get that set up again.
577866	581400	If you just press this open button you can install the extension and link it.
581433	584300	Another extension that I highly recommend is GitHub.
584300	589400	If you're unfamiliar with git and GitHub, this is essentially a version control software for code.
589433	593866	This means that you can save your changes, that you can recover them later on.
593900	598333	You can store them in the clouds, you can use them from a different device and you can share them with your teammates.
598400	602033	This is a standard anytime you're building even a medium sized project.
602033	604633	Really any type of coding project, you should be using this.
604633	606866	So create a free GitHub account.
606866	607400	Very easy.
607400	611833	You can just go to github.com and then you can connect your GitHub account here inside of Codex.
611833	618933	So it can automatically make what's called a repository, which is just storing your code effectively and upload it to the clouds that you're not going to lose it.
618933	623300	You can access it from other devices and you can revert back in case Codex makes a change.
623333	625800	It breaks whatever the version of your project is.
625800	635533	I'm not going to be teaching git in GitHub too much, but I do highly recommend that you set up that plugin and you can see we have a few other ones here like Google Drive, presentations, spreadsheets, slack, Gmail.
635533	638900	You can add as many of these as you want, but I'm going to stick with these for right now.
638900	643300	So now that we have the computer plugin installed, I want to show you how to use this.
643300	650666	So if I go and I use this at symbol, you can see that I can actually reference different applications and specifically this computer.
650700	651066	Right.
651066	654400	So from computer what I can do is ask it to do something.
654666	656900	So let's start by doing something simple.
656900	665266	Open up notepad, close any of the existing windows that are there, and then write a simple note and describe your ideal day.
665266	667933	I know you're a computer, but just come up with something, okay?
667933	669833	I'm just giving it kind of random prompt.
669833	674233	By the way, if you're wondering what I'm using to prompt here, I always use this tool called Whisper Flow.
674400	677200	Very good for voice dictation, especially in AI tools.
677200	678585	I'll leave a link to it so you can check it out.
678585	679133	In the description.
679133	681933	You can see that I use it a ton based on my usage.
681933	683733	Very very good and free to try out.
683733	687100	Okay, so let's run this and let's see what we get here.
687100	689233	And you can see that it's going to use the computer plugin.
689233	691233	And it should control my computer.
691233	696233	And keep in mind that while it's controlling my computer, I can still use the computer myself.
696233	698027	So I can navigate into an application.
698027	699066	I can close something.
699066	704033	I don't need to have it kind of freely using the mouse, because it will actually use its own cursor.
704033	709033	Okay, apologies, because it had a note there that I didn't want you guys to see, so I had to kind of rerun this.
709033	714600	But you can see that it actually just opened up my computer here, open up notepad and wrote this note inside for me.
714633	714833	Okay.
714833	719514	So now if I want to say something, can you continue this node and make it like double or triple the length?
719514	720600	Don't worry if it's unsaved.
720600	721833	Just keep writing okay.
721833	722700	And let's hit enter.
722700	726333	And again you'll see that we kind of get that blue hue around our computer.
726333	737100	And it's able to take over and do anything that we want, which can be super useful, especially for automating, kind of like testing a website, going through a form, running a task repetitively.
737100	737866	You get the idea.
737866	738942	So let's see how it works.
738942	740433	And you can see that just opened it.
740433	742233	And then did it extend the note?
742233	746033	I guess not, says thinking okay, maybe it will take over again in a second.
746200	749600	But when it does that you also see it's kind of cursor appearing, which I think is pretty cool.
749633	751833	Okay, so for some reason it didn't keep controlling the note.
751833	753266	But let's just do another example here.
753266	760133	I'm going to say computer, open up Spotify, find Drake's most popular song, and then tell me what it is and play it okay.
760200	762733	And let's just do this as an example so we can see okay.
762733	765500	So it actually found that Spotify wasn't installed on my computer.
765500	768266	And it's going to now do this from Chrome which is what I was trying to show.
768266	771400	So I'm going to allow this to access my Chrome browser okay.
771433	776833	So we can see it opened this, it actually started playing the song, I just paused, I don't want to get the copyright strike and it found the song for me.
776833	779500	And then if I go here it says that this is the most popular one.
779500	781733	Okay, I don't know if that's true, but at least that's what it gave us.
781733	784933	So the point is it can control Chrome, it can control its own devices.
784933	785700	So keep that in mind.
785700	786666	That's super useful.
786666	789800	But now let's move to some more coding related features okay.
789833	794533	So if we're done with the current chat here, what we can do is just press new chat and open up a new one here.
794533	798066	And what I'm going to do now is I'm actually going to create a new project.
798066	801033	Now, whenever you're coding, I recommend that you make a new projects.
801033	806333	You can organize all of your chats for that specific project, and you can go back and find them easily.
806400	809100	It's not required to do this, but it's kind of a good practice.
809100	810933	So you can see that I can make new project.
810933	812700	I can use an existing folder.
812700	815466	So maybe I have an existing code repo that I want to use.
815466	816266	I can open that up.
816266	818133	And that's kind of what a project is.
818133	820233	It's really just a folder on your computer.
820233	821866	Or I can start one from scratch.
821866	825633	So I'm going to start one from scratch, and I'm just going to call this I don't know chess game.
825633	830033	And what we'll do is we'll try to make like an interactive chess game here using Codex.
830033	832066	So you can see that it's made a new project for me.
832066	833333	It's called Chess Game.
833333	836233	And notice that we have a few options here for the project.
836233	839400	Now I have the ability to connect to Codex Web.
839400	844500	This would essentially send all of the kind of info to the cloud, which is a little bit more complicated.
844533	849033	We can work locally, which just means we're working on our own computer, which is what we're going to do here.
849033	851133	Or we can create something called a work tree.
851133	859500	Now we're going to look at work trees later, but essentially this is a clone of this kind of project so that we can work on multiple things at the same time without having a conflict.
859500	862700	So for now, we're going to leave it in the current location that it's in.
862733	865466	You'll notice that it automatically is connecting to get.
865466	867466	So it's created a branch called main.
867466	870466	And you can make different branches if you're familiar with git.
870466	871800	But we're not going to look at that for right now.
871800	875533	I'm also just going to move this to full access mode, just so I don't need to keep approving things.
875533	878200	And you can see it's pretty straightforward what you do here with those.
878200	880000	So now let me give this a simple prompt.
880000	882000	I want to create a simple chess game.
882000	890200	I want to have a back end which is using WebSockets and kind of keeping track of scores and ratings and stuff in a database in people's usernames.
890200	893200	And then I want to have a front end where we can actually play this.
893200	897266	I want it to be multiplayer, so I want two people to be able to play against each other.
897300	901500	We can keep it simple, have an MVP to start and then build everything out.
901533	901666	Okay.
901666	904833	So I'm just giving it kind of, you know, prompt on what I, what it is that I want it to do.
904833	906433	I want it to build something out here.
906433	908266	And we're going to go ahead and press enter.
908266	910066	And I just want to show you how this works okay.
910066	912200	So we can see here the Codex is now working.
912200	913466	It's making multiple files.
913466	914733	We can see what it's doing.
914733	917633	And I can kind of go into this and inspect the different commands.
917633	919400	But I want to see what's actually running.
919400	921266	If I expand this right toggle.
921266	923666	Now you'll notice that it's giving me a preview tab.
923666	926666	We don't see anything right now because we're just waiting for it to finish the files.
926666	932400	But we will be able to see all of the different files, code changes and all this stuff going on here in one second.
932400	939266	And then if I go here to this kind of little, I don't know, to do list icon, you can see that we have a bunch of options.
939266	940866	So I can change where I want it to work.
940866	944100	I can change the branch I can commit or push directly to GitHub.
944133	947433	Now it's not giving us any results because it's not available online right now.
947433	949033	It's just locally on our computer.
949033	949833	But you get the idea.
949833	952033	And then we can view the changes which is making right now.
952033	953633	So we're just waiting for those to finish.
953633	956700	So there's a lot that will start happening when you actually write code.
956700	958729	And then I can also toggle open the terminal.
958729	959000	Right.
959000	961233	So I can run commands or see what's happening there.
961233	962633	Let's go back into this view.
962633	966200	And then I can open this in any of the tools that are shown here.
966200	971233	So if I wanted to open this in cursor and view all of the code in IDE, I can press that button and do so.
971233	972200	So let's wait a second for it.
972200	979600	To finish writing this code, you can see that it's starting to show me some of the files that we have inside of this folder, and then we'll review it and see what we get okay.
979633	981533	So just finished the first pass here.
981533	984800	It says that it built the multiplayer chess MVP and started locally.
984800	989300	And if I press on any of the links here, you'll notice that they'll actually open directly in Codex.
989300	991266	So you can see that it's opened up right here.
991266	992400	We kind of have this view.
992400	995066	I can change the view, make it large or small or whatever.
995066	998133	So let's give a username maybe like Tim okay.
998200	999400	And join the game.
999400	1001733	And then let's try to find a game okay.
1001733	1003800	And then I'm just going to open up another browser here.
1003800	1006900	So you can see I can press this plus button go browser.
1006900	1008833	We can actually manually type.
1008833	1011200	So localhost 3000 okay.
1011200	1015533	And let's see maybe we can change this as I don't know Joe or something.
1015866	1016251	Okay.
1016251	1018100	Join in and find a game.
1018100	1021033	And you can see that we find a game and then we can start playing.
1021033	1024733	So I don't know let me try to move here and see if it moves on this side.
1024733	1025800	And it looks like it's working.
1025800	1032100	So let's make a move like that I'm not going to play the full thing out, but you guys get the idea that it is indeed working.
1032100	1033579	We have a track of all the moves.
1033579	1034700	We have some leaderboard.
1034700	1044233	And then maybe if I resign, you can see now the ELO has updated and I want so says white wins by resignation I mean pretty cool that that worked that fast.
1044266	1047266	Now within this browser view there's a few buttons you should be aware of.
1047266	1051133	So if you have a look at this right hand side, you can see that you can actually take a screenshot.
1051133	1053000	If you do that, it will save it to the clipboard.
1053000	1061066	And then you can copy that screenshot or paste it sorry, into the chat in case you want to capture what's going on inside of this window rather than doing it manually.
1061066	1064900	And of course, ChatGPT and GPT here can do image generation.
1064900	1066000	It can view images.
1066000	1067933	So that's I mean it should be straightforward.
1067933	1069066	You also can annotate.
1069066	1073200	So if you annotate this will allow you to select different HTML elements.
1073200	1077866	So for example maybe I'm going to select this and I can say something like I don't really like this title.
1077866	1081366	I think we can make it look a lot better and put a chess logo okay.
1081433	1086533	And then we can go here and we can actually just update any of the values directly on screen.
1086533	1090433	I'm not going to do that because I would prefer just to prompt it, but I'm just going to run that.
1090466	1094633	You can see we now have an annotation in chat and I can start adding other annotations.
1094633	1102600	So maybe I'm going to say can we change the color of the board or have like a white or dark mode, or maybe change the square colors?
1102800	1105033	I'm just giving random prompts going to show you this works.
1105033	1108333	And you can see we have annotations and I can say like go or something.
1108333	1115066	And now it's going to have the annotations that we made in the browser, and it's going to make those changes which are a lot more targeted.
1115100	1115295	Okay.
1115295	1117833	So I just refresh because I want to see what this was doing live.
1117833	1122200	And you can see if I go here now and I refresh, we've kind of changed what the board looks like.
1122233	1123498	Obviously we've disconnected.
1123498	1124633	Now we're waiting to join.
1124633	1129100	We can see we have the kind of chess icon and it's essentially followed the annotations we asked for.
1129133	1129333	Okay.
1129333	1134700	So hopefully that gave you a bit of information on how the general kind of coding works inside of Codex.
1134733	1136033	It's very good for me.
1136033	1139100	I really like this user interface, and I like using this application.
1139100	1143866	And I mean, you can see that it gives us pretty good results, even though I didn't do anything crazy.
1143866	1146066	So now let's move to a few more advanced features.
1146066	1148633	Let's start by having a look at some basic commands.
1148633	1151633	So commands are just anything that start with a slash.
1151633	1156600	And there's a ton of built in commands inside of cloud code or not cloud code inside of Codex.
1156600	1160433	I'm not going to go over all of them, but I'll show you a few that you should be aware of.
1160466	1164600	So first, if we do slash, we're going to want to look at status.
1164633	1166866	Now status will just show you your usage limit.
1166866	1169700	So you can see that for a five hour limit I'm at 98%.
1169700	1172433	And for my seven day limit I'm at 99%.
1172433	1174400	It also gives me my context limit.
1174400	1179466	Now the context can be viewed using this little kind of circular icon down here.
1179466	1185866	It won't give you a detailed breakdown, but you'll be able to see how much you've used, how much is left, and how many tokens are there.
1185900	1199933	Now, depending on the models you're using, the context size can change, but this is something that's useful to be aware of because if the context gets too large, which means you have too many, you know, too much conversation, history, tool calls, etc., you will need to compact that.
1200100	1202266	Now there's actually a command that can do this for you.
1202266	1204066	It's called slash compact.
1204066	1209800	Now what slash compact will do is it will take everything that you have in your current conversation history.
1209800	1221133	So all of the tool calls, all of the code, anything that it's understood in this whole conversation that we've had, and it will generate a summary of that and then add that to kind of a new, fresh conversation that you'll start.
1221133	1227200	So you'll notice that after I did that, we now if we look at the what is it context use here, we've only used for percent.
1227200	1229100	So it's taken 22% there.
1229100	1231633	It's condensed it down given us a summary.
1231633	1233000	And now we can continue.
1233000	1237933	Now it's not a great idea to compact super early because you want to use up the context window.
1237933	1246133	But as soon as you start getting to 70%, 80%, 90% context, you typically want to compacted because you're going to get better results.
1246133	1250066	Because as the model fills up with context, it performs worse.
1250100	1251233	This is pretty well known.
1251233	1252900	I'm not going to go into all of the details.
1252900	1254700	Just be aware that command exists.
1254700	1260300	You can use it in Codex will automatically compact for you if you're going to go past your context.
1260300	1265300	So you may want to do it at a time that you decide, rather than waiting for it to do it automatically.
1265333	1268933	Now, another thing that we can do, which is sometimes useful, is we can fork this.
1268933	1276533	Now you can see that if we type slash fork, it will allow us to fork this chat into a local or new work tree, which we're going to look at effectively.
1276533	1286033	What this will do is take everything that we've done and just create a complete copy of it, so we can work in multiple agents at the same time without them having any conflict.
1286033	1293066	So they both will kind of work in their own copy of the code base, and then they can go and kind of joy in everything together.
1293100	1294700	Fix any of the merge conflicts.
1294700	1299266	When we get to the final version again, we'll look at fork in a minute, but that is a command to be aware of.
1299266	1300803	You have the fast mode feedback.
1300803	1302100	We're not going to do that.
1302100	1305833	A NIT goal and some other kind of modes that we'll look at here in a second.
1305866	1306933	Few last things to be aware of.
1306933	1308100	You can also pin chats.
1308100	1310433	So if we want this chat to be available we can pin it.
1310433	1313200	And then we can create new chats inside of the same project.
1313200	1314800	So you can see it's in chess game here.
1314800	1320033	And we can decide how we want to work and just have another agent either running at the same time or in a new chat.
1320033	1325054	If we want to ask for something different and kind of forget the previous conversation history we had here.
1325054	1327333	Anyways, let's go to a new chat.
1327333	1332733	Now we're inside of chess game, and let's use a new mode that we haven't seen yet, which is plan.
1332733	1336133	So if we use slash plan, we can enable plan mode.
1336133	1337733	You'll see that it's here and now.
1337733	1342200	With plan mode, what we can do is we can ask this something a little bit more detailed.
1342200	1343800	We can describe what we want.
1343800	1350233	And Codex will prompt us with different questions and kind of clarifying details before it goes and executes the plan.
1350266	1354400	Pretty straightforward, but typically you want to make a plan before you do something too complex.
1354400	1359200	So really for our chess game, we should have started in plan mode, built the plan, and then execute it.
1359200	1362100	I was just saving it for later because it's a little bit more complex.
1362100	1364933	So now maybe I want to expand this chess game.
1364933	1365936	I want to have puzzles.
1365936	1367200	I want to have a leaderboard.
1367200	1370400	I want to have maybe a big UI, I want to have whatever accounts.
1370400	1372400	So let's start generating a plan for that.
1372400	1374700	I want to expand our chess game.
1374700	1383900	I want to have a better landing page so that a user can see their stats, and they have the ability to either play a game or play a puzzle or go to like a practice board.
1383900	1389833	I want to generate a few different game modes, and I want to really polish this up and make it kind of like a Chess.com clone.
1389866	1391733	Let's start with just the MVP features.
1391733	1393133	Can you generate a plan for this?
1393133	1398000	Ask me any questions you need to okay, so let's go here and press enter.
1398000	1401066	And because it's in plan mode it's going to map everything out.
1401066	1406100	And it should start asking us some questions and prompting us so that it can generate that for us.
1406133	1406400	Okay.
1406400	1409433	So we can see that it's now prompting us with a few questions in the bottom here.
1409433	1414133	So it says for the first MVP pass, which mode set should the landing page launch?
1414233	1420066	We can have add bot game, add time modes or core three ship the landing page, live game, daily star puzzles.
1420066	1421033	Let's go with that.
1421033	1423400	How should the user stats work for an MVP?
1423400	1424400	Let's just go.
1424400	1425196	Username.
1425196	1426433	Profiles okay.
1426433	1427360	Username.
1427360	1427978	Login.
1427978	1429318	Expand stats.
1429318	1429833	Okay.
1429866	1432466	How deep should the puzzle mode be an MVP?
1432466	1433633	Let's just do.
1434633	1434900	Yes.
1434900	1438500	Small bundled puzzled library that looks good and that we continue.
1438533	1443333	Now while it's doing this, also mention that if you open up the sidebar here, you'll see a few more options.
1443333	1447400	Because we're in this kind of coding environment, we can now view all of the files.
1447400	1449433	If we want to look at this, we see we have the database.
1449433	1451100	We can open up the server right.
1451100	1455900	And you can modify the code, or you can add comments directly inside of here or tag different things.
1455900	1458300	And now you'll see that it's generating the plan.
1458300	1460466	I believe the plan will be stored in this repo.
1460466	1463666	I might just need to refresh, but we should be able to view it.
1463666	1469466	So if I want to look at the plan here, you can see we can open it up and it gives us everything that needs to be done.
1469500	1469900	Okay.
1469900	1473600	So I could just implement this plan right and just start running with that.
1473600	1485100	But what I want to show you now is another mode that's super useful, that is going to get things done a lot more efficiently for us without us having to keep approving things or prompting the model multiple times.
1485100	1487033	And that is called goal.
1487033	1490700	So there is this slash command called slash goal.
1490733	1494600	Now if we use this let me just actually type it out.
1494633	1499733	What will happen is that codex will run until a goal is achieved.
1499733	1504733	Now this is kind of that agent loops that you may have heard about recently that everyone's talking about.
1504800	1506033	They have that built in now.
1506033	1509200	So what we can do is we can say, hey, here's the goal.
1509200	1514433	And we just set a high level objective, and Codex will keep going until the goal is achieved.
1514433	1518066	So it will plan, it will execute and then it will review if it's achieved the goal.
1518066	1520400	And if it hasn't, it will just keep running.
1520400	1524000	So it's not just going to do one pass or implement one set of features.
1524000	1526300	It will go until the goal is achieved.
1526300	1532000	Now, in order to use this effectively, you need to set a good goal and the conditions for the goal to be achieved.
1532033	1538300	Now, in our case, we already have the plan so we can effectively just say keep running until the entire plan is implemented.
1538300	1540333	It will then run check if the plan is done.
1540333	1541900	If it's not, it will keep going.
1541900	1543400	If it is, it will finish.
1543400	1548233	So this will allow it to run for a long period of time, which also will use a lot of usage.
1548233	1549733	So keep that in mind.
1549733	1555666	So for the goal I'm going to say okay, keep running and implement the entire plan until the plan is fully finished.
1555666	1560333	Everything is tested, everything is working and we are confident to deploy this.
1560633	1563666	Again, not the best prompt in the world, but I'm just showing you the usage here.
1563666	1567000	And now that the plan is enabled, we have goal set.
1567066	1571633	I can press enter and you can see that it's going to pursue this goal and start running.
1571633	1573466	And we can view this is the goal.
1573466	1575466	And it's going through all of the different steps.
1575466	1579633	And it will just be this infinite loop which can take a very long time to run.
1579666	1579933	All right.
1579933	1582900	So the goal has just finished it built this application for us.
1582900	1586133	I don't know if it's fully working, but you guys get the idea and it's done.
1586200	1589900	So now let's have a look at some more features and start going through it okay.
1589933	1591000	So first things first.
1591000	1594600	If you look at any of these chats you have the ability to right click them.
1594600	1596833	You can pin them rename them.
1596833	1600733	You can also fork them into a local version or a new work tray.
1600733	1608233	Now I want to really briefly discuss what a work tree is, because it's a little bit complicated, and we'll save the full usage for a part two.
1608266	1611100	So let me know if you guys want to see that in the comments down below.
1611100	1613866	Now, if I try to open a new project here, right.
1613866	1614700	So I've gone sorry.
1614700	1615266	New chat.
1615266	1616501	Okay, so I want new chat.
1616501	1618033	And then I selected Chess Game.
1618033	1622066	And then what I did is rather than selecting work locally, I selected new work tree.
1622066	1625266	I have the ability to create a local environment.
1625300	1635466	Now the reason this is important is that if you want to run parallel agents at the same time, they should be working in their own copy of the repository or the project that you have.
1635533	1642633	If they work on the same files, there can be conflicts because they're touching the same information at the same time, and that's not good.
1642666	1645466	So the solution to this is a work tree.
1645466	1647466	This is provided by git.
1647466	1651000	Again it's a little bit complicated to setup and a bit confusing to use.
1651000	1652933	So I'm not going to go through all of the details.
1652933	1659933	But if you do want to run parallel agents at the same time, you have multiple tasks going, this is what you would use.
1659933	1667800	You have to configure the environment first, which you can ask Codex to help you do, and then you can change the branches and stuff in order to work on the different features.
1667800	1674633	And now you'll have different agents because you can run multiple at the same time, working in these kind of copies of the same repo.
1674633	1678733	Again, this is a more advanced developer feature, so I'm not going to dive into it too much.
1678800	1681133	Now, another feature that's somewhat related to this.
1681133	1682733	Let's go back to local copy.
1682733	1685700	Here is this tool called Slash Review.
1685700	1693733	Now this is a code review that can automatically compare any changes that have been made in the current session against what's in GitHub.
1693800	1694266	Okay.
1694266	1702000	So if I go to maybe this right now and I go slash review, you can see that I can review this against a base branch.
1702000	1706400	So a branch in git if you're familiar with that or review any uncommitted changes.
1706400	1719300	So if I go slash review right and then uncommitted changes it's going to start looking at all of the changes that it made here and automatically review them to make sure that they're good before we push them to get or before we commit them.
1719300	1727600	This is a pretty useful feature that Codex has, and this is something you should always do after you've done a large amount of changes before you push them to remote repository.
1727600	1729066	And if you don't know what that means, don't worry.
1729066	1735400	But if you're a developer, you'll understand the value of having a built in shortcut that will do all of those passes and checks for you.
1735433	1738833	Okay, so you can see that it's done the review and it's given us some comments now.
1738833	1742233	And it said, hey, these are errors that I found after doing the code review.
1742266	1742545	Right.
1742545	1744266	So let me go ahead and fix them okay.
1744266	1747866	So let's move to the next feature which is memory and context.
1747900	1753900	Now this is less maybe, I don't know demo wise and more me explaining how this works because I want you to understand this.
1753900	1756833	So if I make a new chat right here okay.
1756833	1760466	And we go into this and I'm working locally, I want you to see something.
1760600	1765100	What did I do in my last session when I was working on the chess game?
1765200	1776433	Now, the reason why I'm going to run this prompt and show you the result, is that you need to understand that by default, Codex doesn't remember things that you worked on in the past.
1776433	1787866	Anytime you create a new chat, what it's doing is reviewing anything that you have in your current repo, kind of trying to load in information and find any context that's relevant and then give you an answer.
1787866	1790933	But by default it doesn't remember everything that you did.
1790933	1793500	So it won't have the full conversation history.
1793500	1799066	It won't know maybe preferences that you told it, and it can forget things because it doesn't remember by default.
1799100	1807433	The only reason this actually just gave me a response is because it looked inside of my project here that I'm inside of and was able to find that information.
1807433	1813233	But if I go to a new chat and I say and I remove the project, what did I work on for my chess game?
1813400	1817033	And I just ask it something really vague like that, it shouldn't know.
1817200	1820800	At least I don't think it will know because it's not going to have any of that context.
1820833	1827800	The reason why I'm mentioning this is that you need to understand that anytime you make a new session, you're effectively starting from scratch.
1827800	1831633	And anything that you want this to know, it has to already exist as a file.
1831633	1834700	It has to be saved persistently so Codex can read it in.
1834700	1839333	And you can see here that it's not able to really find the information very well for me here.
1839333	1846233	And it has to actually go and look through the different conversation history and threads to find this information so it can find it.
1846233	1851433	But the only reason it can do that is because it's searching through the threads and it's very slow.
1851433	1853900	And again, it's not going to remember everything by default.
1853900	1861233	The reason why I'm mentioning this is that you can fix this problem by creating something called an agent dot file.
1861233	1875800	Now this is something that's common in all of your code base tools, CLI based tools, whatever AI agents where you can make effectively a memory file that will always be loaded into the prompt or into the model before you start working with it.
1875800	1885133	Now this is a really good file to create, especially when you're working on larger projects with multiple people, because you can store preferences, different tools or stacks that you want to use.
1885200	1891400	I wouldn't say credentials, but you can store just important info that you don't want to have to keep telling the model over and over again.
1891433	1893466	So for example, I can tell this.
1893466	1903266	I would like you to create an agent file with all of the conventions for this project, specifically the tech stack that we're using, how to run it, and what we've set up so far.
1903900	1904400	Okay.
1904400	1908300	And what this will do now is create a new file for us called agents.
1908833	1910000	You'll see it in a second.
1910000	1912433	It's automatically making it starts with all capitals.
1912433	1915666	And it's going to fill this file with important info then.
1915666	1924066	Now we're never going to forget or Codex will never forget because this is by default automatically load it into Codex anytime we make a new conversation.
1924066	1926833	So let's give this a second to make the file and see what it looks like.
1926833	1933400	So let's open this up and you can see that it gives us project conventions, direction, tech stack, how to run it, etc..
1933433	1938400	So now if we make a new conversation, I go, what are the project conventions?
1938400	1942033	It's not going to have to search through a bunch of files to find this.
1942066	1948033	It can just get it directly from its kind of system info now, because it will have been loaded in and MD.
1948033	1950433	So you can see it just immediately gives us the result.
1950433	1955233	It doesn't need to read anything because it was already loaded in when we started the conversation.
1955233	1962333	If we look at the context, you can see the context is slightly higher usage than normal because it's started by loading that file.
1962500	1963800	I hope that that makes sense to you.
1963800	1976100	I know that's not the best explanation possible, but anything that you want to be kind of long term, persistent info that's going to be used all of the time, you want to put it in this agents MD file and tell Codex to create that for you.
1976100	1982466	And you can continually update this to improve the performance of the model you use in a particular project.
1982500	1986900	Okay, so that is kind of the agents, the in memory info that you need to know.
1986900	1989200	And the last thing we'll look at is scheduled tasks.
1989200	1999933	Now I'm not going to actually create these, but I'm just going to mention that they exist just like cloud code or other tools that you may have used, you can create scheduled tasks that run automatically for you, assuming your computer is on.
1999933	2006000	So you can make a daily brief where every morning it opens your computer, searches the news and gives you some info.
2006000	2009200	You can do a weekly review where it tells you all the things you worked on.
2009200	2012233	You can do project monitor where if something changes, we do this.
2012233	2019466	So if I do create via chat, for example, I can make it to set up a scheduled task for me automatically, or I can go to templates and I can pick one.
2019466	2021933	So maybe like this, this is what I want to do.
2021933	2025466	I want to run it in this chat or in a work tree.
2025833	2027266	I want to in this project.
2027266	2029300	I want it to repeat at this time.
2029300	2030800	Then this is the model that I want to use.
2030800	2031042	Okay.
2031042	2032400	So again you can make these.
2032400	2039133	You can have them set to run and you can set this up to kind of automatically do things for you, which is useful if you want some automations.
2039133	2040428	But for me I don't really need any.
2040428	2041833	So I don't have those setup as of now.
2041833	2050733	And then of course, you can search through all of your chats and a bunch of other stuff, and we can go crazy and we can go to add MCP servers.
2050733	2052333	We can control the browser use.
2052333	2056633	We can do computer use, hooks, connections, git environments, work trees.
2056633	2059333	There is a lot more to go over, but I'm going to save that for a part two.
2059333	2072700	If you guys let me know in the comments that you want to see an advanced version of this that is going to wrap up this video, that was a pretty comprehensive overview of Codex, a lot of the features, how to use it, some good demos, setting up a lot of the important plugins.
2072700	2075900	At this point, you know, probably 90% of Codex.
2075966	2079633	If you want the extra 10%, let me know and I will happily make an advanced version.
2079633	2083666	For those of you that are devs and are kind of past some of the beginner stuff that I showed here.
2083666	2084900	Anyway, I hope you enjoyed.
2084900	2088633	If you did leave a like subscribe and I will see you in the next one.
