1
00:00:00,100 --> 00:00:02,940
You know, if there is one thing that gets
my motor running in the shed,

2
00:00:03,340 --> 00:00:07,200
it is making developer workflows fly
without burning a hole in your pocket.

3
00:00:08,160 --> 00:00:13,020
Before we dive in, quick shoutout to our
sponsor Jellypod AI for making this episode

4
00:00:13,120 --> 00:00:13,500
possible.

5
00:00:13,992 --> 00:00:15,172
Yeah, absolutely!

6
00:00:15,532 --> 00:00:20,532
And today we have to talk about a massive
fix that landed in Claude Code version

7
00:00:20,892 --> 00:00:23,452
2.1.275.

8
00:00:24,212 --> 00:00:27,872
If you have been using custom system
prompts with the system prompt flag,

9
00:00:28,352 --> 00:00:30,372
you might have been unknowingly burning
money.

10
00:00:30,638 --> 00:00:31,378
Wait, how so?

11
00:00:31,698 --> 00:00:33,878
Was it, uh, missing the cache entirely?

12
00:00:34,240 --> 00:00:34,700
Exactly.

13
00:00:35,300 --> 00:00:38,980
Developers were putting things like git
commit SHAs, build timestamps,

14
00:00:39,060 --> 00:00:41,840
or environment variables right at the top
of their prompt files.

15
00:00:42,360 --> 00:00:46,520
And because Anthropic's prompt cache
relies on exact prefix matching from the top

16
00:00:46,600 --> 00:00:51,600
down, changing a single date string busted
the entire prompt cache on every single

17
00:00:51,720 --> 00:00:51,980
turn.

18
00:00:52,420 --> 00:00:53,520
Oh, oof!

19
00:00:54,540 --> 00:00:59,420
That is like, er, busting the entire cache
because a timestamp changed on a static

20
00:00:59,500 --> 00:00:59,800
image.

21
00:01:01,480 --> 00:01:03,200
It is basically like web caching, right?

22
00:01:03,940 --> 00:01:08,000
You want your big static library files
sitting on a global CDN with a super long

23
00:01:08,100 --> 00:01:12,200
time to live, while your dynamic user
session stuff gets calculated on the fly.

24
00:01:12,430 --> 00:01:14,590
That is the perfect analogy.

25
00:01:15,130 --> 00:01:19,790
And to solve this, Anthropic added a
special sentinel line: double underscore SYSTEM

26
00:01:19,890 --> 00:01:22,430
PROMPT DYNAMIC BOUNDARY double underscore.

27
00:01:22,500 --> 00:01:23,220
Right, right.

28
00:01:23,247 --> 00:01:27,540
So everything above that magic boundary
line gets treated as a static array prefix

29
00:01:27,620 --> 00:01:29,940
and cached globally across requests.

30
00:01:29,958 --> 00:01:30,598
Yes!

31
00:01:30,678 --> 00:01:35,558
And anything below that line is treated as
dynamic context per request.

32
00:01:35,771 --> 00:01:41,158
In long running sessions, this cuts input
token costs by up to 90 percent.

33
00:01:41,267 --> 00:01:42,267
Ninety percent!

34
00:01:42,887 --> 00:01:44,727
Crikey, that is serious savings.

35
00:01:44,792 --> 00:01:45,712
It really is.

36
00:01:45,737 --> 00:01:49,992
Picture a CI CD code review workflow where
you run claude with a custom system

37
00:01:50,026 --> 00:01:54,152
prompt file like dot claude slash review
prompt dot txt.

38
00:01:54,299 --> 00:01:57,832
Above the boundary line, you put your org
wide linting rules,

39
00:01:57,876 --> 00:02:00,632
security guidelines, and architectural
standards.

40
00:02:00,760 --> 00:02:04,872
Then below the boundary line, you put the
PR author's name and the commit time.

41
00:02:05,095 --> 00:02:06,055
Ah, gotcha.

42
00:02:07,135 --> 00:02:10,935
So all those heavy company rules stay
cached for every build,

43
00:02:11,415 --> 00:02:13,595
and only the PR metadata shifts.

44
00:02:13,908 --> 00:02:14,608
Exactly.

45
00:02:15,008 --> 00:02:20,148
But there is a huge caveat developers need
to watch out for: byte matching above

46
00:02:20,208 --> 00:02:22,468
that boundary line is strictly enforced.

47
00:02:23,008 --> 00:02:28,548
If your text editor changes line endings
from LF to CR LF, or adds a sneaky space at

48
00:02:28,588 --> 00:02:31,828
the end of a line above the boundary,
boom, full cache miss.

49
00:02:32,635 --> 00:02:34,695
Classic invisible whitespace trap!

50
00:02:35,055 --> 00:02:37,655
That will get you every time if you are
not careful.

51
00:02:38,555 --> 00:02:38,995
Oh yeah.

52
00:02:39,695 --> 00:02:45,615
But speaking of sneaky invisible stuff,
version 2.1.277 brought another great

53
00:02:45,675 --> 00:02:48,995
quality of life fix: automatic prompt
sanitization.

54
00:02:49,510 --> 00:02:50,950
What kind of sanitization?

55
00:02:51,042 --> 00:02:55,842
It automatically strips invisible Unicode
formatting tags and zero width spaces from

56
00:02:55,902 --> 00:02:57,522
prompts before sending them.

57
00:02:57,629 --> 00:03:02,162
Turns out attackers were hiding prompt
injection payload instructions inside zero

58
00:03:02,215 --> 00:03:03,922
width Unicode characters!

59
00:03:04,638 --> 00:03:05,318
No way!

60
00:03:05,598 --> 00:03:07,018
Invisible prompt injection?

61
00:03:07,598 --> 00:03:09,778
That is sneaky as a snake in the grass.

62
00:03:09,917 --> 00:03:10,157
Right?

63
00:03:10,177 --> 00:03:14,317
Now Claude Code cleans them out and shows
you the clean text before executing.

64
00:03:14,333 --> 00:03:14,893
Love that.

65
00:03:15,133 --> 00:03:18,333
What else shipped recently in the terminal
tool?

66
00:03:18,333 --> 00:03:24,733
Well, in 2.1.275, if you run claude plugin
install with a marketplace flag pointing

67
00:03:24,786 --> 00:03:29,613
to an unregistered source, it detects it
and asks if you want to auto register that

68
00:03:29,660 --> 00:03:31,133
marketplace in one command.

69
00:03:31,167 --> 00:03:33,807
Nice, no separate configuration step
needed.

70
00:03:33,833 --> 00:03:39,993
And in 2.1.278, they added an Auto mode
server status row when you run slash

71
00:03:40,073 --> 00:03:44,713
status, so you can immediately see if your
session's auto mode classifier is running

72
00:03:44,770 --> 00:03:48,633
server side where it does not charge you
extra classifier token overhead.

73
00:03:48,807 --> 00:03:52,867
Clean cost savings, better security, and
smoother plugin installs.

74
00:03:53,527 --> 00:03:55,787
Gotta love when point releases pack this
much punch.

75
00:03:56,387 --> 00:03:57,447
Good chatting as always!

