1
00:00:00,000 --> 00:00:05,120
Picture a test runner subagent forty turns
deep, still hauling every stack trace it

2
00:00:05,160 --> 00:00:07,680
has ever seen into each new request.

3
00:00:07,840 --> 00:00:13,760
That's the mess Claude Code 2.1.296 goes
after, released October 9th.

4
00:00:13,952 --> 00:00:17,200
This episode's brought to you by Jellypod
AI.

5
00:00:17,560 --> 00:00:19,680
I'm Lachlan, and with me is James.

6
00:00:19,708 --> 00:00:25,708
Last time we covered 2.1.292 and the
effort parameter for subagents,

7
00:00:25,735 --> 00:00:29,708
which lets you dial down reasoning on
mechanical jobs like grepping logs.

8
00:00:29,836 --> 00:00:32,348
That handled how hard a subagent thinks.

9
00:00:32,828 --> 00:00:36,508
2.1.296 handles how much it carries.

10
00:00:36,648 --> 00:00:42,108
The release adds `autoCompactWindow` to
subagent frontmatter and to the agents flag

11
00:00:42,168 --> 00:00:42,908
definitions.

12
00:00:43,068 --> 00:00:48,028
The changelog describes it as letting a
subagent auto compact earlier than the main

13
00:00:48,083 --> 00:00:49,388
conversation's window.

14
00:00:49,417 --> 00:00:50,457
Here's why that matters.

15
00:00:50,571 --> 00:00:55,657
Worker subagents tend to do noisy,
repetitive work: running test suites,

16
00:00:55,737 --> 00:00:57,977
linters, parsing build logs.

17
00:00:58,077 --> 00:01:00,857
All that terminal chatter piles up in
context.

18
00:01:00,957 --> 00:01:05,577
And every new turn re-sends that whole
pile, which shows up as cache reads in your

19
00:01:05,657 --> 00:01:09,977
usage, so cost per turn grows with how
full the window is.

20
00:01:10,057 --> 00:01:11,897
There's also the accuracy side.

21
00:01:12,057 --> 00:01:16,857
Long agent sessions on a big window can
rot before compaction kicks in,

22
00:01:16,897 --> 00:01:21,097
and one GitHub feature request put it as
sessions rotting before they reach the

23
00:01:21,137 --> 00:01:23,177
roughly 95 percent default.

24
00:01:23,310 --> 00:01:27,177
Treat that as a user's description, not an
Anthropic benchmark.

25
00:01:27,277 --> 00:01:31,257
But the logic is sound: a lean worker
beats a bloated one.

26
00:01:31,500 --> 00:01:32,780
So the setup is decoupling.

27
00:01:32,892 --> 00:01:37,340
Your orchestrator can sit on a huge window
with the full architectural history,

28
00:01:37,380 --> 00:01:39,340
while workers compact way sooner.

29
00:01:39,484 --> 00:01:40,780
Here's the config.

30
00:01:40,967 --> 00:01:45,900
In your agent file under the dot claude
agents folder, say test-runner.md,

31
00:01:45,920 --> 00:01:50,220
the frontmatter has the name test-runner,
a description like runs the test suite and

32
00:01:50,280 --> 00:01:55,100
inspects stack traces, the model set to
Haiku 5.5, effort low,

33
00:01:55,200 --> 00:01:58,060
and then `autoCompactWindow` set to 50000.

34
00:01:58,188 --> 00:01:59,700
That's the new line.

35
00:01:59,790 --> 00:02:04,620
Effort low is the 2.1.292 feature, so the
two stack nicely.

36
00:02:04,625 --> 00:02:09,025
And if you're spinning agents up on the
fly, same key works in the JSON you pass to

37
00:02:09,045 --> 00:02:10,145
the agents flag.

38
00:02:10,257 --> 00:02:16,545
Something like claude, the agents flag,
then a JSON object with a key called linter,

39
00:02:16,589 --> 00:02:22,625
containing the Haiku 5.5 model ID and
`autoCompactWindow` of 60000.

40
00:02:22,812 --> 00:02:27,665
Worth knowing: the value is an absolute
token count, an integer.

41
00:02:27,785 --> 00:02:28,945
Not a percentage.

42
00:02:29,045 --> 00:02:32,945
Writing 0.5 or fifty percent is not what
it wants.

43
00:02:32,958 --> 00:02:36,878
Now the caveats, and the first one's a
judgment call, so take it as guidance.

44
00:02:37,022 --> 00:02:42,638
Compaction costs an LLM call, and the
harness reserves up to 20,000 tokens for the

45
00:02:42,688 --> 00:02:43,598
summary output.

46
00:02:43,710 --> 00:02:47,998
That figure comes from a third party
analysis of Claude Code's internals,

47
00:02:48,051 --> 00:02:50,718
so treat it as background rather than
official docs.

48
00:02:50,878 --> 00:02:55,998
The upshot is that if you set the window
too low, say under roughly 40,000,

49
00:02:56,038 --> 00:02:59,198
a subagent could spend more turns
summarizing than working.

50
00:02:59,305 --> 00:03:03,438
Starting between 40,000 and 80,000 is a
sensible range.

51
00:03:03,458 --> 00:03:08,578
Second caveat: compaction summarizes older
turns, so exact details can get

52
00:03:08,650 --> 00:03:09,378
condensed.

53
00:03:09,618 --> 00:03:15,218
If your subagent needs a specific git
hash, a line number, or a raw diff from way

54
00:03:15,282 --> 00:03:19,218
back, tell it in its prompt to write those
into a scratchpad file.

55
00:03:19,351 --> 00:03:21,458
Files survive compaction.

56
00:03:21,578 --> 00:03:23,698
Summaries are lossy by nature.

57
00:03:23,708 --> 00:03:25,508
One more related addition.

58
00:03:25,688 --> 00:03:30,634
`CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL` runs
every workflow agent on one model,

59
00:03:30,691 --> 00:03:33,415
while other subagents keep theirs.

60
00:03:33,468 --> 00:03:38,401
So in CI you can export it as Haiku 5.5
and keep your scripted workflow agents

61
00:03:38,455 --> 00:03:41,788
cheap, without touching the specialized
reasoning agents.

62
00:03:41,868 --> 00:03:46,988
And a quiet one that pairs well: the debug
flag now names unrecognized frontmatter

63
00:03:47,068 --> 00:03:50,908
fields in custom agent files, with a hint
for likely typos.

64
00:03:50,961 --> 00:03:54,668
So if you misspell `autoCompactWindow`,
you'll find out instead of wondering why

65
00:03:54,668 --> 00:03:54,668
nothing compacts.

66
00:03:54,708 --> 00:03:55,828
A few smaller wins.

67
00:03:55,968 --> 00:04:00,948
The Read tool gets an `allow_large`
option, so Claude can read a text file past the

68
00:04:01,001 --> 00:04:05,428
usual size limits in one call, when it
needs the whole file and the context has

69
00:04:05,492 --> 00:04:05,988
room.

70
00:04:06,168 --> 00:04:11,508
Sonnet 5.5 cache reads are now priced at
ten cents per million tokens,

71
00:04:11,540 --> 00:04:15,188
down from twenty, across the cost command,
the status line,

72
00:04:15,228 --> 00:04:18,068
the max budget flag, and the SDK's
figures.

73
00:04:18,083 --> 00:04:22,803
The default limit on MCP tool descriptions
and server instructions sent up front

74
00:04:22,883 --> 00:04:27,523
doubled, from 2,048 to 4,096 characters.

75
00:04:27,923 --> 00:04:34,643
`CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS`
lets you set a longer maximum delay when

76
00:04:34,710 --> 00:04:37,443
retrying overloaded 529 errors.

77
00:04:37,623 --> 00:04:42,323
And debug output for command hooks now
logs the command, plugin,

78
00:04:42,383 --> 00:04:47,363
outcome, and duration when they finish, so
a slow hook finally has a name attached.

79
00:04:47,375 --> 00:04:53,135
Last one: in auto mode, a tool call
skipped because the safety check had no usable

80
00:04:53,192 --> 00:04:58,175
answer now shows as a dim Not run row, not
a red error.

81
00:04:58,303 --> 00:04:59,855
Less panic over nothing.

82
00:05:00,228 --> 00:05:02,095
So here's your homework.

83
00:05:02,223 --> 00:05:07,855
Pick your noisiest subagent, add
`autoCompactWindow` at 50000,

84
00:05:07,975 --> 00:05:11,695
run it, and watch the context command to
see it compact.

