Open History to see the last commit
1---
2id: CodeModeExecutionStartedEvent
3title: CodeModeExecutionStartedEvent
4---
5
6Defined in: [packages/ai/src/types.ts:1535](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1535)
7
8Custom event for extensibility.
9
10@ag-ui/core provides: `name`, `value`, `subagentRunId?`
11
12## Extends
13
14- [`CustomEvent`](CustomEvent.md)
15
16## Properties
17
18### metadata?
19
20```ts
21optional metadata?: Record<string, any>;
22```
23
24Defined in: [packages/ai/src/types.ts:1416](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1416)
25
26Extra information attached to this event.
27
28#### Inherited from
29
30[`CustomEvent`](CustomEvent.md).[`metadata`](CustomEvent.md#metadata)
31
32***
33
34### name
35
36```ts
37name: "code_mode:execution_started";
38```
39
40Defined in: [packages/ai/src/types.ts:1536](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1536)
41
42What this custom event is. Required: without it a consumer cannot route
43the value.
44
45#### Overrides
46
47```ts
48CustomEvent.name
49```
50
51***
52
53### type
54
55```ts
56type: "CUSTOM";
57```
58
59Defined in: [packages/ai/src/types.ts:1415](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1415)
60
61#### Inherited from
62
63[`CustomEvent`](CustomEvent.md).[`type`](CustomEvent.md#type)
64
65***
66
67### value
68
69```ts
70value: object;
71```
72
73Defined in: [packages/ai/src/types.ts:1537](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1537)
74
75The payload. Any JSON value, and required.
76
77#### codeLength
78
79```ts
80codeLength: number;
81```
82
83#### timestamp
84
85```ts
86timestamp: number;
87```
88
89#### Overrides
90
91```ts
92CustomEvent.value
93```