1
00:00:00,260 --> 00:00:03,980
Ever head off for lunch with a huge
refactor open in your terminal,

2
00:00:04,440 --> 00:00:08,340
come back an hour later, and your first
message feels slow and costly?

3
00:00:09,020 --> 00:00:09,780
There's a fix for that.

4
00:00:10,580 --> 00:00:14,600
This is The Claude Code Changelog, brought
to you by Jellypod AI.

5
00:00:15,220 --> 00:00:15,720
I'm Lachlan.

6
00:00:16,208 --> 00:00:16,808
And I'm James.

7
00:00:17,168 --> 00:00:23,268
Today is Claude Code 2.1.299, released
October 14, and the headline is idle

8
00:00:23,308 --> 00:00:24,688
compaction in the terminal.

9
00:00:25,208 --> 00:00:26,188
Here's the exact change.

10
00:00:26,688 --> 00:00:31,328
If a conversation is over 200K tokens and
sits idle for about 54 minutes,

11
00:00:31,728 --> 00:00:35,288
Claude Code compacts it before the one
hour prompt cache expires.

12
00:00:35,768 --> 00:00:39,028
So when you come back, your next message
doesn't reprocess the whole thing.

13
00:00:39,562 --> 00:00:40,542
Why 54 minutes?

14
00:00:41,082 --> 00:00:42,702
Because the cache lasts an hour.

15
00:00:43,162 --> 00:00:47,762
The compaction fires with a few minutes to
spare, while the big context is still

16
00:00:47,922 --> 00:00:48,342
warm.

17
00:00:49,042 --> 00:00:52,802
Without it, you'd come back at minute 65,
the cache would've expired,

18
00:00:53,242 --> 00:00:57,522
and that first message would have to chew
through all 200K tokens again.

19
00:00:57,970 --> 00:00:59,830
Right, and that's the practical impact.

20
00:01:00,390 --> 00:01:02,730
Long sessions are exactly where this
bites.

21
00:01:03,070 --> 00:01:06,310
Big refactors, heavy debugging, huge tool
outputs.

22
00:01:06,790 --> 00:01:11,050
Those push you past 200K, and those are
also the sessions you walk away from for a

23
00:01:11,110 --> 00:01:12,390
meeting or a code review.

24
00:01:12,990 --> 00:01:15,070
Now the cost of walking away is handled
for you.

25
00:01:15,715 --> 00:01:20,255
It's the same family of idea as what we
covered in the Taming Subagent Bloat

26
00:01:20,335 --> 00:01:24,895
episode, with autoCompactWindow in
2.1.296.

27
00:01:25,595 --> 00:01:28,255
That one let worker subagents compact
early.

28
00:01:28,975 --> 00:01:32,815
This one brings compaction thinking to
your main interactive session,

29
00:01:33,335 --> 00:01:34,375
aimed at the cache clock.

30
00:01:35,098 --> 00:01:36,458
Now, how do you actually use it?

31
00:01:37,098 --> 00:01:38,078
Mostly you don't.

32
00:01:38,358 --> 00:01:40,058
It's on by default in the terminal.

33
00:01:40,538 --> 00:01:41,718
But there are two knobs.

34
00:01:42,198 --> 00:01:43,178
First, the threshold.

35
00:01:43,658 --> 00:01:50,358
Set CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS to
change that 200K

36
00:01:50,418 --> 00:01:50,738
minimum.

37
00:01:51,238 --> 00:01:54,678
So if your sessions tend to sit around
120K and you want them covered,

38
00:01:55,178 --> 00:01:57,978
export it with a lower number before you
launch claude.

39
00:01:58,878 --> 00:02:00,218
Second, the off switch.

40
00:02:00,898 --> 00:02:04,738
In settings.json, set idleCompaction to
false.

41
00:02:05,498 --> 00:02:12,418
Both of these need version 2.1.290 or
later, so run claude dash dash version

42
00:02:12,498 --> 00:02:14,158
first if you're not sure what you've got.

43
00:02:14,950 --> 00:02:16,670
Worth saying why you might turn it off.

44
00:02:17,030 --> 00:02:20,530
Compaction replaces the verbatim
conversation with a summary.

45
00:02:21,050 --> 00:02:25,430
If you're mid investigation and you need
an exact stack trace or exact line numbers

46
00:02:25,530 --> 00:02:27,730
later, a summary might not preserve them.

47
00:02:28,350 --> 00:02:32,790
A habit I'd suggest: before you step away,
ask Claude to write the details you need

48
00:02:32,850 --> 00:02:34,570
into a notes file in the repo.

49
00:02:34,990 --> 00:02:37,310
That's my suggestion, not something from
the release notes.

50
00:02:38,158 --> 00:02:38,638
Good call.

51
00:02:39,338 --> 00:02:41,098
And here's one the changelog does cover.

52
00:02:41,778 --> 00:02:48,678
2.1.299 updated /reload-skills so it says
it re-sends the full skill

53
00:02:48,738 --> 00:02:52,518
list to Claude, and that's the way to get
your skills back after compaction.

54
00:02:53,218 --> 00:02:56,538
So if Claude seems to have forgotten a
custom skill after you return,

55
00:02:56,878 --> 00:02:57,238
run that.

56
00:02:58,157 --> 00:02:59,017
One more caveat.

57
00:02:59,417 --> 00:03:02,997
The changelog doesn't say what happens if
you close the terminal or your laptop

58
00:03:03,097 --> 00:03:04,197
sleeps during that window.

59
00:03:04,777 --> 00:03:07,477
The feature is described as happening
while the session sits idle,

60
00:03:07,717 --> 00:03:10,917
so I'd assume the session needs to be
running, but that's an inference.

61
00:03:11,417 --> 00:03:12,857
Don't count on it for a closed lid.

62
00:03:13,445 --> 00:03:13,705
Fair.

63
00:03:14,345 --> 00:03:16,365
Now the smaller bits worth a mention.

64
00:03:16,925 --> 00:03:23,705
First, a new env var,
CLAUDE_CODE_DISABLE_FILE_MENTIONS.

65
00:03:24,365 --> 00:03:29,645
With it set, when you @ mention a file,
Claude gets the path to read with its file

66
00:03:29,725 --> 00:03:33,045
tools, rather than the contents getting
stuffed into the prompt.

67
00:03:33,785 --> 00:03:35,765
Handy if you mention big files a lot.

68
00:03:36,580 --> 00:03:41,780
Second, in agent view, /effort and /fast
now set what new sessions start with,

69
00:03:42,260 --> 00:03:46,000
and a bare /model, /effort or /fast opens
a picker.

70
00:03:46,840 --> 00:03:52,000
Third, UserPromptSubmit hooks now run
before a skill or custom slash command

71
00:03:52,040 --> 00:03:52,640
expands.

72
00:03:53,120 --> 00:03:57,080
So a hook that blocks the prompt also
stops that command's embedded shell commands.

73
00:03:57,620 --> 00:04:00,100
If you use hooks as guardrails, that's a
real tightening.

74
00:04:00,892 --> 00:04:02,952
And two safety and housekeeping ones.

75
00:04:03,552 --> 00:04:08,532
The resume command printed at exit now
uses the session ID instead of the session

76
00:04:08,652 --> 00:04:12,312
name, so nothing in a name can run when
you paste that line.

77
00:04:13,212 --> 00:04:17,852
And when you @ mention PDFs, their bytes
are no longer kept in the session

78
00:04:17,971 --> 00:04:20,632
transcript, which helps memory and disk.

79
00:04:21,400 --> 00:04:22,080
So the takeaway.

80
00:04:22,560 --> 00:04:27,560
Update to 2.1.299, check whether your
typical session crosses 200K,

81
00:04:28,000 --> 00:04:34,940
and if it doesn't, consider lowering
CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS.

82
00:04:35,580 --> 00:04:39,460
If you rely on exact verbatim history, set
idleCompaction to false,

83
00:04:39,640 --> 00:04:41,200
or save your notes to a file first.

84
00:04:42,047 --> 00:04:42,727
That's the update.

85
00:04:43,187 --> 00:04:45,747
Go check your version, and we'll catch you
on the next release.

