1
00:00:00,620 --> 00:00:03,099
You know that feeling when you've got an
agent loop running,

2
00:00:03,500 --> 00:00:07,919
it's been cooking for like three hours,
it's about to write the final test suite,

3
00:00:08,420 --> 00:00:08,899
and then...

4
00:00:09,559 --> 00:00:10,000
boom.

5
00:00:10,779 --> 00:00:15,399
Just a, a cold, empty HTTP 400 Bad
Request.

6
00:00:16,079 --> 00:00:17,500
Whole run, gone.

7
00:00:18,692 --> 00:00:21,432
Oh, it's- it's the absolute worst.

8
00:00:21,813 --> 00:00:24,793
Especially because, like, you're looking
at the OpenAI docs,

9
00:00:25,092 --> 00:00:30,492
and they're shouting about this massive,
one-million-token limit for the new GPT-5.6

10
00:00:30,572 --> 00:00:30,932
models...

11
00:00:31,372 --> 00:00:32,972
Sol, Terra, Luna.

12
00:00:33,532 --> 00:00:35,853
You think you have all the room in the
world, right?

13
00:00:36,572 --> 00:00:40,212
But first, a quick shout-out to Jellypod
for making our daily show possible.

14
00:00:40,892 --> 00:00:41,032
Now...

15
00:00:41,392 --> 00:00:46,192
Ethan, why did my three-hour agent run
just faceplant into a 400 error?

16
00:00:47,079 --> 00:00:51,219
Well, it- it turns out those
one-million-token limits in the docs...

17
00:00:52,019 --> 00:00:56,039
they aren't what the backend actually lets
you get away with in real-world API

18
00:00:56,159 --> 00:01:00,159
calls, at least not with the way Codex CLI
was feeding them.

19
00:01:00,979 --> 00:01:03,959
The local metadata in the older CLI
versions was...

20
00:01:04,639 --> 00:01:06,420
well, it was all over the place.

21
00:01:06,959 --> 00:01:12,180
It was fluctuating, sometimes claiming
372,000 effective tokens,

22
00:01:12,779 --> 00:01:16,159
other times dropping to 258,000.

23
00:01:16,219 --> 00:01:21,139
So the local CLI keeps greedily packing
files, terminal outputs,

24
00:01:21,200 --> 00:01:25,759
and context into the prompt, thinking,
"Hey, I've got plenty of space!"

25
00:01:26,500 --> 00:01:31,299
And then the API server just violently
rejects the payload because it actually hit a

26
00:01:31,360 --> 00:01:31,899
hard ceiling.

27
00:01:32,897 --> 00:01:38,957
Wait, so the CLI was essentially lying to
itself about how big the window was?

28
00:01:39,577 --> 00:01:39,937
That's...

29
00:01:40,317 --> 00:01:42,157
I mean, no wonder it crashed.

30
00:01:42,557 --> 00:01:46,458
It's like trying to squeeze a moving truck
into a standard parking spot because your

31
00:01:46,537 --> 00:01:49,077
GPS told you the spot was fifty feet wide.

32
00:01:49,674 --> 00:01:50,434
Exactly!

33
00:01:50,855 --> 00:01:56,614
And that's exactly what the Codex v0.144.6
release tackles.

34
00:01:57,294 --> 00:02:04,074
If you look at commits #33972 and #34009,
they did a hard

35
00:02:04,134 --> 00:02:05,635
correction of the local metadata.

36
00:02:06,354 --> 00:02:12,594
The current freshly fetched catalog now
exposes a unified context window of exactly

37
00:02:12,954 --> 00:02:14,854
272,000 tokens.

38
00:02:15,614 --> 00:02:18,534
No more guessing, no more weird
fluctuations.

39
00:02:18,923 --> 00:02:22,682
Okay, so 272,000.

40
00:02:23,222 --> 00:02:23,622
That's...

41
00:02:24,182 --> 00:02:25,222
it's specific.

42
00:02:25,942 --> 00:02:30,463
But how does having that exact number
locally stop the 400 errors?

43
00:02:31,043 --> 00:02:34,583
Does it just stop reading files when it
hits 272k?

44
00:02:35,083 --> 00:02:36,203
Not quite.

45
00:02:36,230 --> 00:02:38,363
It's actually smarter than just hitting a
wall.

46
00:02:38,543 --> 00:02:45,403
See, because the local CLI now *knows* the
limit is strictly 272,000 tokens,

47
00:02:45,456 --> 00:02:50,603
it can trigger its internal
auto-compaction and sliding-window history truncation

48
00:02:50,803 --> 00:02:52,443
*before* it sends the request.

49
00:02:52,656 --> 00:02:57,483
It cleans up its own room locally, rather
than letting the server do the screaming.

50
00:02:57,899 --> 00:02:58,919
Ah, okay.

51
00:02:59,059 --> 00:03:01,519
So it's- it's like a proactive edit.

52
00:03:02,019 --> 00:03:07,599
It trims the fat, slides the window, and
makes sure the payload is lean enough to

53
00:03:07,659 --> 00:03:08,579
pass the gatekeeper.

54
00:03:09,259 --> 00:03:09,719
That's...

55
00:03:10,079 --> 00:03:14,699
I mean, that's going to save so many
autonomous runs from just dying mid-task.

56
00:03:15,239 --> 00:03:15,539
Right.

57
00:03:15,879 --> 00:03:18,119
And they didn't just stop at the context
window.

58
00:03:18,699 --> 00:03:24,440
They also refreshed the bundled system
instructions for the whole GPT-5.6 family...

59
00:03:25,179 --> 00:03:27,719
Sol, Terra, and Luna.

60
00:03:27,899 --> 00:03:31,639
Apparently, the older prompts were causing
the models to get stuck in these slow,

61
00:03:32,180 --> 00:03:33,440
circular reasoning loops.

62
00:03:34,020 --> 00:03:38,579
Like, it would invoke a tool, think about
it, invoke it again slightly differently,

63
00:03:38,979 --> 00:03:41,519
and just burn through credits while
inflating latency.

64
00:03:42,841 --> 00:03:44,841
The classic AI rabbit hole.

65
00:03:45,381 --> 00:03:48,462
"Let me search this again just to be
sure."

66
00:03:48,522 --> 00:03:50,462
So the new instructions make them more...

67
00:03:51,002 --> 00:03:51,661
direct?

68
00:03:52,042 --> 00:03:56,922
Yeah, they guide the model to output tool
invocations much more reliably the first

69
00:03:56,986 --> 00:03:57,642
time.

70
00:03:57,722 --> 00:04:00,122
Less hesitation, more doing.

71
00:04:00,964 --> 00:04:02,224
Speaking of hesitation...

72
00:04:02,724 --> 00:04:06,164
can we talk about the package manager turf
war that's been going on in the

73
00:04:06,244 --> 00:04:06,704
background?

74
00:04:07,224 --> 00:04:11,844
Because if you're a pnpm user, the Codex
JS launcher has been...

75
00:04:11,884 --> 00:04:13,984
well, let's say "stubborn."

76
00:04:15,517 --> 00:04:18,877
Oh, the pnpm folks have been fighting this
for a while.

77
00:04:18,976 --> 00:04:22,196
Issue #30440, right?

78
00:04:22,709 --> 00:04:23,329
Yes!

79
00:04:23,490 --> 00:04:24,349
Exactly.

80
00:04:24,869 --> 00:04:30,789
So, standard Node paths are pretty
predictable, but global bin directories in pnpm

81
00:04:30,849 --> 00:04:32,929
can be a completely different beast.

82
00:04:33,590 --> 00:04:38,010
Before this update, if you ran something
like codex doctor or tried to upgrade

83
00:04:38,011 --> 00:04:42,389
through the terminal UI, the launcher
would just completely miss the fact that you

84
00:04:42,430 --> 00:04:43,609
were using pnpm.

85
00:04:44,090 --> 00:04:49,069
It would default to npm or Bun, mess up
your local paths, and leave you with these

86
00:04:49,129 --> 00:04:51,329
weird, broken, stale binaries.

87
00:04:51,549 --> 00:04:52,329
It was a mess.

88
00:04:52,807 --> 00:04:53,268
Huh.

89
00:04:53,708 --> 00:04:56,747
So how did they actually fix that
detection?

90
00:04:56,787 --> 00:05:01,028
Because pnpm's global structure is
famously nested and...

91
00:05:01,787 --> 00:05:02,668
well, tricky.

92
00:05:03,087 --> 00:05:08,047
So, PR #31503 has this really elegant
workaround.

93
00:05:08,587 --> 00:05:13,787
When you start Codex, the JS entrypoint
does a recursive scan looking for a very

94
00:05:13,887 --> 00:05:18,088
specific file: node_modules/.modules.yaml.

95
00:05:18,607 --> 00:05:21,067
That's pnpm's unique metadata file.

96
00:05:21,628 --> 00:05:25,827
If it finds that, it knows, "Aha, we are
in pnpm territory."

97
00:05:26,227 --> 00:05:28,927
And then it passes a specific environment
marker...

98
00:05:29,388 --> 00:05:32,347
CODEX_MANAGED_BY_PNPM=1...

99
00:05:32,727 --> 00:05:35,908
directly down to the native Rust-based CLI
binary.

100
00:05:36,327 --> 00:05:37,167
Oh, I see!

101
00:05:37,607 --> 00:05:42,188
So the Rust binary doesn't have to do the
heavy lifting of parsing Javascript folder

102
00:05:42,287 --> 00:05:47,128
structures; it just looks for that single
environment variable from the JS wrapper.

103
00:05:47,652 --> 00:05:48,492
Exactly.

104
00:05:48,872 --> 00:05:52,213
And once that flag is set, everything
falls into place.

105
00:05:52,713 --> 00:05:57,952
If you run codex doctor, it actually
recommends the correct pnpm commands instead of

106
00:05:57,972 --> 00:06:00,092
trying to force npm down your throat.

107
00:06:00,458 --> 00:06:01,498
That is...

108
00:06:01,551 --> 00:06:06,218
honestly, such a relief for monorepo and
pnpm setups.

109
00:06:06,271 --> 00:06:09,738
So, if someone is listening and wants to
get this sorted right now,

110
00:06:09,770 --> 00:06:10,538
what's the play?

111
00:06:10,921 --> 00:06:11,642
Super simple.

112
00:06:12,061 --> 00:06:18,221
Just run pnpm add -g @openai/codex to grab

113
00:06:18,281 --> 00:06:24,741
v0.144.6, and then run codex doctor to
make sure it's seeing the global setup

114
00:06:24,801 --> 00:06:25,181
correctly.

115
00:06:25,701 --> 00:06:29,601
It should point to the clean pnpm command
lines for all your future updates.

116
00:06:29,994 --> 00:06:31,115
Beautiful.

117
00:06:31,214 --> 00:06:36,674
No more corrupt paths, no more 400 Bad
Request crashes at 2 AM.

118
00:06:36,774 --> 00:06:38,635
All right, that's it for our quick look
today.

119
00:06:39,074 --> 00:06:39,914
Catch you next time.

120
00:06:40,217 --> 00:06:40,877
Bye everyone.

