1
00:00:00,399 --> 00:00:05,500
So, if an automated build fails halfway
through an AI agent's refactoring job,

2
00:00:06,039 --> 00:00:09,979
how does the agent actually find out
without a human jumping into the chat window?

3
00:00:10,432 --> 00:00:14,392
Well, until now, you kind of had to hack
it or wait for a fresh turn.

4
00:00:15,092 --> 00:00:20,932
But in OpenAI's recent Python SDK zero
point one five four point zero release for

5
00:00:20,992 --> 00:00:25,092
Codex, there is a brand new primitive
called ExternalMessage.

6
00:00:25,526 --> 00:00:26,886
ExternalMessage.

7
00:00:27,387 --> 00:00:29,426
What does that actually do under the hood?

8
00:00:29,833 --> 00:00:36,073
It lets external systems, think CI
runners, webhooks, live telemetry feeds,

9
00:00:36,187 --> 00:00:39,593
inject data straight into an active run or
turn.

10
00:00:39,753 --> 00:00:44,953
And here is the kicker, it joins with tool
level execution authority,

11
00:00:45,033 --> 00:00:46,713
not user authorization.

12
00:00:47,049 --> 00:00:48,069
Wait, say that again?

13
00:00:48,729 --> 00:00:50,409
Tool level authority?

14
00:00:50,932 --> 00:00:51,251
Right.

15
00:00:51,591 --> 00:00:55,611
So it can feed live context to the model
as if a tool produced it,

16
00:00:56,071 --> 00:01:00,931
but it cannot pretend to be a human
approving a dangerous command or granting new

17
00:01:01,031 --> 00:01:01,552
permissions.

18
00:01:01,944 --> 00:01:08,085
Okay, but if an inbound webhook has tool
level authority to push text into a running

19
00:01:08,164 --> 00:01:08,565
turn...

20
00:01:09,204 --> 00:01:13,005
isn't that a massive security surface if
someone spoofs the payload?

21
00:01:13,333 --> 00:01:14,293
Oh, absolutely.

22
00:01:14,313 --> 00:01:18,053
You, you have to treat those inbound
endpoints with serious discipline.

23
00:01:18,179 --> 00:01:23,093
Strict HMAC signatures, payload
validation, the whole nine yards.

24
00:01:23,183 --> 00:01:27,973
Because the model will act on that
incoming stream as valid tool output.

25
00:01:28,319 --> 00:01:29,299
That makes sense.

26
00:01:30,079 --> 00:01:35,299
What happens if my monitoring code
attaches to the turn handle a few seconds late?

27
00:01:35,960 --> 00:01:37,539
Does it catch up on what happened?

28
00:01:37,875 --> 00:01:42,995
Ah, that is actually a big gotcha in zero
point one five four point zero.

29
00:01:43,059 --> 00:01:47,315
Late joining turn handles only get events
from the exact moment they attach.

30
00:01:47,427 --> 00:01:49,715
They do not replay old events.

31
00:01:50,090 --> 00:01:54,190
Wait, so if you attach late, you miss the
earlier output?

32
00:01:54,542 --> 00:01:55,262
Exactly.

33
00:01:55,449 --> 00:02:01,022
If you attach after completion, it will
even raise a TransportClosedError.

34
00:02:01,235 --> 00:02:06,782
If you need saved history, you have to
read the thread explicitly instead of relying

35
00:02:06,809 --> 00:02:08,142
on the event handle replay.

36
00:02:08,507 --> 00:02:09,787
Got it, got it.

37
00:02:09,907 --> 00:02:12,426
So attach early or read history.

38
00:02:13,127 --> 00:02:18,746
Now, what about when a turn needs massive
compute, like an architectural overhaul?

39
00:02:19,405 --> 00:02:23,644
Yeah, they added max and ultra to the
reasoning effort settings now.

40
00:02:24,244 --> 00:02:29,844
So alongside low, medium, and high, you
can crank it all the way up to ultra for

41
00:02:29,904 --> 00:02:31,524
really deep logic problems.

42
00:02:31,944 --> 00:02:33,644
Ultra reasoning effort.

43
00:02:34,125 --> 00:02:34,504
Wow.

44
00:02:35,044 --> 00:02:37,284
And can you adjust priority on the fly
too?

45
00:02:37,667 --> 00:02:38,627
You can!

46
00:02:38,680 --> 00:02:41,107
There is a new turn service tier
parameter.

47
00:02:41,227 --> 00:02:45,347
You can assign a higher service tier to
just one critical turn,

48
00:02:45,387 --> 00:02:47,667
without changing your global account
defaults.

49
00:02:48,126 --> 00:02:52,446
Now, I saw there was a breaking migration
in this release around hooks.

50
00:02:53,047 --> 00:02:55,406
What is breaking for developers upgrading
today?

51
00:02:55,952 --> 00:02:58,452
Right, so HookMetadata got refactored.

52
00:02:58,932 --> 00:03:01,912
It now wraps handler fields inside a root
property.

53
00:03:02,546 --> 00:03:05,887
So if my code was checking hook dot
command...

54
00:03:06,208 --> 00:03:07,008
It breaks!

55
00:03:07,148 --> 00:03:10,848
You need to update that to hook dot root
dot command.

56
00:03:10,988 --> 00:03:16,528
And you should check hook dot root dot
handler type first before accessing any

57
00:03:16,578 --> 00:03:18,048
handler specific fields.

58
00:03:19,183 --> 00:03:21,722
classic zero point release breaking
change.

59
00:03:22,422 --> 00:03:24,262
What else changed with thread history?

60
00:03:24,667 --> 00:03:29,867
They added include turns on resume and
fork calls, plus source metadata.

61
00:03:30,054 --> 00:03:35,627
It lets you pull full turn history for
rendering custom UI timelines without shoving

62
00:03:35,687 --> 00:03:40,187
all those historical turns back into the
model's active context window.

63
00:03:40,507 --> 00:03:43,007
Oh, that is huge for token budgets!

64
00:03:43,407 --> 00:03:48,548
So your front end gets the full
conversation, but the model context stays lean.

65
00:03:49,037 --> 00:03:49,777
Precisely.

66
00:03:50,337 --> 00:03:55,657
And on top of that, notifications are now
typed payloads instead of raw params

67
00:03:55,717 --> 00:04:00,397
dictionaries, and they fixed a race
condition where turn completion events arriving

68
00:04:00,437 --> 00:04:03,098
before turn start responses were getting
dropped.

69
00:04:04,444 --> 00:04:08,204
Nothing like preserving completion events
to keep state machines happy.

70
00:04:08,724 --> 00:04:09,684
Good updates overall!

71
00:04:10,000 --> 00:04:11,960
Yeah, solid release.

72
00:04:12,000 --> 00:04:15,040
Definitely check those hook migration
paths before upgrading!

