1
00:00:00,159 --> 00:00:04,960
So, I was- I was testing the new Codex App
build, specifically build

2
00:00:05,159 --> 00:00:10,679
26.715.21425, and I ran into something
that is just...

3
00:00:11,359 --> 00:00:15,179
it is an absolute nightmare for anyone
running long dev sessions.

4
00:00:15,839 --> 00:00:22,699
If you are on the, uh, 0.145.0-alpha.18
app-server, and you

5
00:00:22,760 --> 00:00:28,159
decide to flip your reasoning effort from,
say, "Low" to "High" mid-session...

6
00:00:28,840 --> 00:00:29,239
boom.

7
00:00:29,879 --> 00:00:34,759
It triggers an automatic, completely
silent context compaction that just...

8
00:00:35,279 --> 00:00:38,179
it wipes out up to 80% of your active
history.

9
00:00:38,659 --> 00:00:39,719
It's just gone.

10
00:00:40,709 --> 00:00:42,529
Wait, 80%?

11
00:00:43,089 --> 00:00:48,109
That is- I mean, that completely defeats
the point of having a long-running project

12
00:00:48,189 --> 00:00:48,469
thread.

13
00:00:49,189 --> 00:00:52,590
And, uh, actually, before we unpack the
logs on how that's happening,

14
00:00:53,090 --> 00:00:57,190
we do want to say thanks to Jellypod to
help make this daily show a reality.

15
00:00:57,909 --> 00:01:00,250
But, Ethan, back to this compaction...

16
00:01:01,029 --> 00:01:07,510
wasn't the stable release, v0.144.6,
supposed to have solved this by waiting until

17
00:01:07,529 --> 00:01:09,509
the context window was actually full?

18
00:01:09,875 --> 00:01:10,755
Yes!

19
00:01:10,803 --> 00:01:13,635
That's what is so incredibly frustrating
about this.

20
00:01:13,822 --> 00:01:18,195
In v0.144.6, it worked beautifully.

21
00:01:18,382 --> 00:01:24,035
It would wait until you hit about 92% to
94% of the, uh, of the

22
00:01:24,195 --> 00:01:30,115
258,400-token window before it did any
proactive compaction.

23
00:01:30,275 --> 00:01:31,555
It was stable.

24
00:01:31,635 --> 00:01:38,355
But on this 0.145.0 alpha engine, we are
seeing it trigger compaction at just

25
00:01:38,515 --> 00:01:40,195
10.4% usage.

26
00:01:40,755 --> 00:01:42,195
10.4%!

27
00:01:42,987 --> 00:01:44,107
Ten percent?

28
00:01:44,607 --> 00:01:46,307
That's barely even getting started.

29
00:01:46,708 --> 00:01:47,828
Exactly.

30
00:01:47,948 --> 00:01:53,668
I had a thread with 26,910 tokens, and
just because I switched the model from

31
00:01:53,828 --> 00:02:00,708
gpt-5.6-sol to gpt-5.4-mini, the backend
freaked out and compacted

32
00:02:00,761 --> 00:02:04,468
it down to 4,644 tokens.

33
00:02:04,681 --> 00:02:07,428
It just, uh, discarded the rest.

34
00:02:07,676 --> 00:02:11,917
Okay, let's look at the telemetry here
because my first thought is,

35
00:02:12,417 --> 00:02:13,956
is this just a UI glitch?

36
00:02:14,377 --> 00:02:19,816
Like, is the sidebar just failing to
display the history, or is the actual state...

37
00:02:19,856 --> 00:02:21,337
is it actually being destroyed?

38
00:02:21,792 --> 00:02:23,232
Oh, it's- it's destroyed.

39
00:02:23,512 --> 00:02:25,712
I dug into the local database,

40
00:02:25,992 --> 00:02:32,832
~/.codex/logs_2.sqlite, and the logs

41
00:02:32,880 --> 00:02:34,992
show explicit write-ahead events.

42
00:02:35,152 --> 00:02:41,232
You can see the compacted and the
context_compacted events executing sequentially

43
00:02:41,339 --> 00:02:43,312
right when the model switch happens.

44
00:02:43,499 --> 00:02:46,592
It is physically pruning the SQLite state.

45
00:02:48,102 --> 00:02:48,522
Wow.

46
00:02:49,122 --> 00:02:51,083
So it's not a display bug.

47
00:02:51,382 --> 00:02:54,202
It's actually committing that truncation
to the DB.

48
00:02:55,222 --> 00:02:58,442
But, look, Ethan, if we play devil's
advocate for a second...

49
00:02:59,062 --> 00:03:05,882
if you switch from gpt-5.6-sol to
gpt-5.4-mini, the reasoning architecture is

50
00:03:05,923 --> 00:03:06,923
completely different.

51
00:03:07,603 --> 00:03:11,843
The app-server has to keep you from
hitting an unexpected rate limit or a context

52
00:03:11,902 --> 00:03:13,302
overflow on the smaller model.

53
00:03:14,042 --> 00:03:16,022
Silent compaction is a safety valve.

54
00:03:16,602 --> 00:03:20,282
If it didn't do it, the developer would
just get a raw API error,

55
00:03:20,342 --> 00:03:22,722
which is an even worse user experience,
isn't it?

56
00:03:23,201 --> 00:03:25,881
No, I- I- I completely disagree with that
framing.

57
00:03:26,641 --> 00:03:30,101
Silent, destructive compaction is never
the right safety valve.

58
00:03:30,801 --> 00:03:36,181
If I'm running a complex, multi-agent
loop, and the system silently drops my system

59
00:03:36,301 --> 00:03:40,181
prompt or my initial architecture design
from ten turns ago,

60
00:03:40,901 --> 00:03:43,181
the agent is going to start hallucinating.

61
00:03:43,921 --> 00:03:49,141
I would ten times out of ten rather have a
clear API-level error telling me "hey,

62
00:03:49,542 --> 00:03:53,621
you've exceeded the token limit for this
model" than have the tool pretend

63
00:03:53,701 --> 00:03:57,481
everything is fine while secretly
lobotomizing my session state.

64
00:03:57,901 --> 00:03:58,981
Okay, fair.

65
00:03:59,381 --> 00:04:03,841
But we can't just expect developers to
manage token counts manually either.

66
00:04:04,361 --> 00:04:06,462
That's a developer experience nightmare.

67
00:04:07,361 --> 00:04:12,081
Maybe the issue isn't that compaction is
silent, but that the threshold is so

68
00:04:12,141 --> 00:04:13,281
absurdly low.

69
00:04:13,921 --> 00:04:18,901
If we had a configurable rollback
threshold, or if it prompted you- like a warning

70
00:04:19,161 --> 00:04:25,341
saying, "Hey, switching to gpt-5.4-mini
will discard 20,000 tokens of context.

71
00:04:25,701 --> 00:04:26,141
Proceed?"

72
00:04:26,941 --> 00:04:30,582
That way we avoid the API crash and the
silent data loss.

73
00:04:30,958 --> 00:04:33,518
Right, a warning prompt is the bare
minimum here.

74
00:04:33,678 --> 00:04:36,878
But right now, in this alpha, you don't
get any of that.

75
00:04:37,011 --> 00:04:41,998
It just quietly cleans house and leaves
you wondering why your subagents suddenly

76
00:04:42,055 --> 00:04:44,638
forgot what programming language you're
even using.

77
00:04:45,084 --> 00:04:50,545
So, for anyone who is currently stuck on
this alpha build and losing their minds-

78
00:04:50,625 --> 00:04:52,864
and their context- what's the move?

79
00:04:53,324 --> 00:04:56,045
Is there a temporary fix before they patch
the alpha?

80
00:04:56,375 --> 00:05:00,695
Yeah, the most immediate, practical
mitigation is what we're calling "Thread

81
00:05:00,755 --> 00:05:01,095
Pinning."

82
00:05:01,207 --> 00:05:06,295
Basically, once you start a thread, do not
touch the model selection or the

83
00:05:06,351 --> 00:05:08,375
reasoning effort dropdowns.

84
00:05:08,455 --> 00:05:12,055
Keep it locked for the lifetime of that
specific project thread.

85
00:05:12,235 --> 00:05:17,655
And if you absolutely have to switch
models, your best bet is to safely roll back

86
00:05:17,695 --> 00:05:24,615
the CLI and the app backend to that stable
v0.144.6 release we talked

87
00:05:24,655 --> 00:05:24,935
about.

88
00:05:25,336 --> 00:05:27,397
Right, stick to the stable channel.

89
00:05:27,976 --> 00:05:31,877
But speaking of things breaking when you
upgrade, have you seen what's happening

90
00:05:31,897 --> 00:05:33,396
with the VS Code extension?

91
00:05:33,909 --> 00:05:35,950
Oh, the, uh, the webview crash loop?

92
00:05:36,809 --> 00:05:37,369
Yes.

93
00:05:37,409 --> 00:05:38,769
It's a complete mess.

94
00:05:40,688 --> 00:05:41,487
It is!

95
00:05:42,007 --> 00:05:48,567
If you update the VS Code extension to
version 26.715.31925,

96
00:05:48,927 --> 00:05:55,767
which bundles that buggy 0.145.0-alpha.18
CLI, your entire sidebar

97
00:05:55,987 --> 00:05:58,927
basically turns into a perpetual loading
spinner.

98
00:05:59,287 --> 00:06:02,407
It's just a blank screen flashing every
three seconds.

99
00:06:02,827 --> 00:06:04,708
Wait, why three seconds?

100
00:06:04,767 --> 00:06:07,708
Is there a hard-coded retry loop in the
extension host?

101
00:06:08,250 --> 00:06:08,829
Yes!

102
00:06:09,029 --> 00:06:11,089
It's an IPC race condition.

103
00:06:11,629 --> 00:06:16,349
When the extension starts up, the
app-server broadcasts a client-status-changed

104
00:06:16,389 --> 00:06:16,649
event.

105
00:06:17,210 --> 00:06:21,130
But because the React webview inside the
sidebar is still initializing,

106
00:06:21,569 --> 00:06:24,709
it hasn't actually registered its listener
for that broadcast yet.

107
00:06:25,209 --> 00:06:29,029
So the webview misses the status update,
times out after three seconds,

108
00:06:29,430 --> 00:06:32,769
restarts the initialization, and the whole
cycle repeats.

109
00:06:33,229 --> 00:06:37,849
It's just a classic race condition where
the server is too fast for the client UI.

110
00:06:38,224 --> 00:06:39,724
Ah, that makes so much sense.

111
00:06:40,204 --> 00:06:43,585
The server fires the client-status-changed
message into the void,

112
00:06:44,204 --> 00:06:48,944
the UI is still loading its bundles,
misses it, and then panics and reboots.

113
00:06:49,704 --> 00:06:50,304
That is...

114
00:06:50,824 --> 00:06:52,244
man, that is a brutal loop.

115
00:06:52,864 --> 00:06:55,244
And it's not the only silent failure we're
seeing.

116
00:06:55,924 --> 00:07:02,644
If you look at CLI 0.144.5 on Windows,
there's this really weird bug with custom

117
00:07:02,725 --> 00:07:03,584
subagent roles.

118
00:07:04,004 --> 00:07:07,904
Wait, is this the config leak in
$CODEX_HOME/agents/?

119
00:07:08,375 --> 00:07:09,495
Yes!

120
00:07:09,555 --> 00:07:10,455
Exactly.

121
00:07:10,508 --> 00:07:15,255
So, say you set up a custom agent file,
like, uh, luna-canary.toml,

122
00:07:15,381 --> 00:07:17,335
inside your agents directory.

123
00:07:17,495 --> 00:07:22,775
You define its custom instructions, its
specific model, and maybe you set the

124
00:07:22,823 --> 00:07:27,255
reasoning effort to low because it's just
doing basic syntax checking.

125
00:07:27,383 --> 00:07:31,895
Well, the bug is that the CLI silently
ignores those model and reasoning

126
00:07:31,954 --> 00:07:32,935
configurations.

127
00:07:33,055 --> 00:07:38,295
Instead, the subagent silently inherits
whatever the parent session is using.

128
00:07:38,751 --> 00:07:45,091
Wait, so if my parent session is using a
massive, expensive reasoning model with

129
00:07:45,292 --> 00:07:51,771
high effort, my tiny syntax-checking
subagent is going to spin up that exact same

130
00:07:51,911 --> 00:07:53,011
expensive model?

131
00:07:53,492 --> 00:07:53,792
Yes.

132
00:07:54,192 --> 00:07:59,273
It completely ignores the luna-canary.toml
settings and inherits the parent's

133
00:07:59,313 --> 00:07:59,773
config.

134
00:08:00,412 --> 00:08:05,952
It's a massive cost and compute governance
issue, especially for teams tracking API

135
00:08:06,052 --> 00:08:06,333
spend.

136
00:08:06,794 --> 00:08:07,294
Wow.

137
00:08:07,714 --> 00:08:09,634
That is a pretty bad leak.

138
00:08:10,375 --> 00:08:15,135
But, you know, to be fair to the team,
they did push some really solid security

139
00:08:15,175 --> 00:08:19,154
upgrades in that same 0.144.5 release.

140
00:08:19,215 --> 00:08:22,715
They actually expanded the local
Rust-based command filtering.

141
00:08:23,083 --> 00:08:25,883
Right, the dangerous command protection.

142
00:08:25,947 --> 00:08:31,163
They specifically targeted a broader array
of forced rm CLI variations,

143
00:08:31,203 --> 00:08:31,483
right?

144
00:08:31,819 --> 00:08:32,679
Exactly.

145
00:08:33,219 --> 00:08:38,299
If an agent tries to execute some sneaky,
nested rm -rf command,

146
00:08:38,779 --> 00:08:44,000
the local Rust layer intercepts it before
it ever hits the shell and throws a very

147
00:08:44,099 --> 00:08:46,259
clean, structured rejection.

148
00:08:46,299 --> 00:08:48,799
It's a huge step up from the old regex
filters.

149
00:08:49,459 --> 00:08:54,719
But, uh, clearly, with these alpha builds,
they've taken one step forward and two

150
00:08:54,779 --> 00:08:58,879
steps back with this context compaction
and the VS Code webview loop.

151
00:08:59,167 --> 00:09:03,087
Yeah, it's definitely a reminder that if
you're using this for production work,

152
00:09:03,154 --> 00:09:04,847
stick to the stable releases.

153
00:09:05,060 --> 00:09:10,207
Do not run the alphas unless you want your
context wiped and your sidebar spinning.

154
00:09:11,087 --> 00:09:11,667
Definitely.

155
00:09:12,307 --> 00:09:13,607
Alright, I think that's our cue.

156
00:09:14,067 --> 00:09:15,087
Talk to you next time, Ethan.

157
00:09:15,417 --> 00:09:16,137
Yep, see ya.

