You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated JSDoc and troubleshooting docs to accurately describe that
the client-side debug prop forwards config to the AG-UI transport
layer, not CopilotKit's own logging. Removed fabricated console.debug
output examples that don't exist.
Copy file name to clipboardExpand all lines: .claude/docs/architecture.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ debug: {
106
106
107
107
**Runtime:** Agent run started, SSE stream opened/completed/errored, every AG-UI event emitted (with Pino structured logger).
108
108
109
-
**Client:**SSE events received, event validation, chunk transformation, event verification, subscriber dispatch, run lifecycle. Uses `console.debug`via a centralized `DebugLogger`.
109
+
**Client:**The debug configuration is forwarded to the AG-UI transport layer (`transformChunks`). CopilotKit itself does not currently emit client-side `console.debug`calls — the flag configures the underlying AG-UI event pipeline for transport-level debug output.
This forwards the debug configuration to the AG-UI client transport layer (`transformChunks`), which may produce transport-level debug output depending on the AG-UI library version. Note that the richest debug logging comes from the **server-side**`CopilotRuntime` — enable `debug: true` there for full structured Pino logs of every AG-UI event.
73
66
74
67
<Callouttype="info">
75
68
The server and client debug toggles are independent. Enabling debug on the client does not affect the server, and vice versa.
Enable debug on the server side for the most detailed visibility:
121
114
1. Check server logs for `Event emitted` — are the expected events being sent?
122
-
2. Check client logs for `[SSE] Event received` — are they arriving?
123
-
3. Check `[HTTP] Event validated` — are any events failing validation?
124
-
4. Check `[VERIFY]` — are events being rejected by the state machine?
125
-
126
-
### Events Being Dropped
127
-
128
-
Look for `[APPLY] Event dropped` in the client logs. This means a subscriber called `stopPropagation`, preventing the event from being applied to state.
115
+
2. Verify `SSE stream completed` shows the expected `eventCount`.
116
+
3. Use the browser Network tab to confirm SSE events are arriving over the wire.
129
117
130
118
### Tool Calls Not Executing
131
119
132
-
Enable debug and look for:
120
+
Enable server-side debug and look for:
133
121
1.`TOOL_CALL_START` events being emitted on the server
134
122
2.`TOOL_CALL_ARGS` and `TOOL_CALL_END` events following correctly
135
-
3.The events being validated and applied on the client
123
+
3.Confirm the events appear in the SSE stream via the browser Network tab
136
124
137
125
### State Not Updating
138
126
139
-
Look for `STATE_SNAPSHOT` or `STATE_DELTA` events in both server and client logs. If they appear on the server but not the client, there may be a connection issue. If they appear on the client but state isn't updating, check for `stopPropagation` in the apply stage.
127
+
Look for `STATE_SNAPSHOT` or `STATE_DELTA` events in server logs. If they appear on the server but not in the browser's SSE stream, there may be a connection issue.
140
128
141
129
## What Gets Logged
142
130
@@ -152,18 +140,9 @@ Look for `STATE_SNAPSHOT` or `STATE_DELTA` events in both server and client logs
152
140
153
141
In **summary mode** (verbose off), event logs include key identifiers like `messageId`, `toolCallId`, `toolCallName`, `role`, and content lengths instead of full payloads.
154
142
155
-
### Client-Side Logs
156
-
157
-
Events pass through several pipeline stages. Debug mode logs at each one:
143
+
### Client-Side
158
144
159
-
| Stage | Prefix | What's Logged |
160
-
|-------|--------|---------------|
161
-
| SSE Parser |`[SSE]`| Raw events received from the server |
| Event Verification |`[VERIFY]`| Each event passing through the state machine validator |
165
-
| Event Application |`[APPLY]`| Events applied to state, or dropped via `stopPropagation`|
166
-
| Agent Lifecycle |`[LIFECYCLE]`| Run started, finished, or errored |
145
+
On the client, the `debug` configuration is passed through to the AG-UI transport layer. The AG-UI client library controls what (if any) debug output is produced. CopilotKit itself does not emit `console.debug` calls — the debug flag configures the underlying AG-UI event pipeline.
167
146
168
147
<Callouttype="warn">
169
148
Debug mode can produce a large volume of log output, especially in verbose mode. Use it during development and debugging, not in production.
0 commit comments