Kacper Sawicki
f016d9e505
fix(coderd): add role param to agent RPC to prevent false connectivity ( #22052 )
...
## Summary
coder-logstream-kube and other tools that use the agent token to connect
to the RPC endpoint were incorrectly triggering connection monitoring,
causing false connected/disconnected timestamps on the agent. This led
to VSCode/JetBrains disconnections and incorrect dashboard status.
## Changes
Add a `role` query parameter to `/api/v2/workspaceagents/me/rpc`:
- `role=agent`: triggers connection monitoring (default for the agent
SDK)
- any other value (e.g. `logstream-kube`): skips connection monitoring
- omitted: triggers monitoring for backward compatibility with older
agents
The agent SDK now sends `role=agent` by default. A new `Role` field on
the `agentsdk.Client` allows non-agent callers to specify a different
role.
## Required follow-up
coder-logstream-kube needs to set `client.Role = "logstream-kube"`
before calling `ConnectRPC20()`. Without that change, it will still send
`role=agent` and trigger monitoring.
Fixes #21625
2026-02-18 09:44:06 +01:00
..
2026-02-06 16:26:02 -06:00
2025-06-20 13:16:55 -06:00
2026-01-21 19:06:19 +00:00
2026-02-17 15:11:04 +00:00
2025-10-23 15:38:49 -05:00
2026-01-08 15:24:11 +04:00
2026-02-17 15:11:04 +00:00
2025-12-15 13:44:44 -09:00
2026-02-06 09:52:17 -07:00
2026-02-06 10:12:58 +04:00
2026-02-12 13:40:47 -08:00
2025-10-16 01:56:43 +11:00
2026-01-08 15:24:11 +04:00
2026-02-17 15:43:02 +01:00
2026-01-08 15:24:11 +04:00
2026-02-03 17:52:07 +00:00
2026-01-29 13:50:15 +01:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-01-15 16:37:05 +00:00
2026-02-02 16:01:33 +01:00
2026-02-13 08:19:07 -06:00
2026-02-03 17:52:07 +00:00
2026-02-06 09:44:40 +00:00
2025-06-20 13:16:55 -06:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-02-12 09:06:33 +00:00
2026-02-08 23:21:43 +11:00
2025-10-15 17:37:37 +00:00
2025-08-16 01:31:00 +10:00
2026-02-02 17:57:59 -06:00
2026-01-30 13:30:06 +01:00
2026-01-30 13:30:06 +01:00
2026-02-12 13:40:47 -08:00
2025-10-23 15:38:49 -05:00
2025-06-17 09:00:32 -08:00
2026-02-04 15:33:48 +00:00
2025-06-20 13:16:55 -06:00
2025-07-08 14:31:05 +00:00
2025-08-07 11:00:31 +10:00
2026-02-17 15:43:02 +01:00
2026-01-09 15:40:26 -07:00
2026-02-17 15:43:02 +01:00
2025-12-14 03:00:03 +00:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2025-08-22 16:32:35 +10:00
2025-06-20 13:16:55 -06:00
2026-02-02 09:03:18 -06:00
2026-01-08 15:24:11 +04:00
2026-02-11 23:18:49 +11:00
2026-01-08 15:24:11 +04:00
2026-02-12 13:40:47 -08:00
2025-12-15 11:26:41 -06:00
2025-11-17 13:24:12 +00:00
2026-02-12 09:59:53 +02:00
2026-02-12 09:59:53 +02:00
2025-09-26 11:56:34 +02:00
2026-02-17 13:16:46 +00:00
2026-02-17 13:16:46 +00:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2025-10-27 17:14:16 -06:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2026-01-08 15:24:11 +04:00
2026-02-17 13:16:46 +00:00
2026-01-08 15:24:11 +04:00
2026-01-15 16:37:05 +00:00
2026-01-15 16:37:05 +00:00
2025-06-25 13:03:32 +00:00
2025-04-22 16:21:15 +00:00
2025-06-24 09:14:41 +01:00
2026-01-12 18:19:19 -08:00
2025-12-15 17:41:47 +00:00
2025-09-04 14:28:29 +10:00
2026-01-08 15:24:11 +04:00
2025-12-15 11:26:41 -06:00
2025-05-15 15:32:52 +01:00
2025-06-20 13:16:55 -06:00
2025-06-20 13:16:55 -06:00
2026-01-26 09:24:45 +00:00
2025-08-19 10:41:33 +02:00
2025-08-19 10:41:33 +02:00
2025-06-20 13:16:55 -06:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-02-03 12:48:25 -06:00
2026-02-03 12:48:25 -06:00
2026-02-13 08:19:07 -06:00
2026-01-08 15:24:11 +04:00
2026-01-15 12:41:28 +03:00
2026-01-15 12:41:28 +03:00
2026-01-15 12:41:28 +03:00
2025-07-03 18:33:47 +02:00
2026-01-15 12:41:28 +03:00
2025-10-22 15:18:42 -05:00
2026-02-03 17:52:07 +00:00
2025-07-15 14:55:34 +10:00
2025-07-15 14:55:34 +10:00
2026-02-02 09:03:18 -06:00
2026-02-03 17:52:07 +00:00
2025-06-24 12:19:19 +02:00
2025-07-28 15:02:26 +01:00
2025-08-21 16:03:34 -04:00
2026-02-03 17:52:07 +00:00
2025-06-20 13:16:55 -06:00
2025-10-06 13:58:37 +02:00
2026-02-03 17:52:07 +00:00
2026-01-12 18:19:19 -08:00
2025-09-26 11:43:32 +02:00
2025-09-26 11:43:32 +02:00
2025-06-20 13:16:55 -06:00
2026-01-08 15:24:11 +04:00
2026-02-13 19:44:50 -05:00
2026-02-13 19:44:50 -05:00
2026-02-03 10:16:53 -06:00
2026-02-03 09:45:23 +00:00
2025-06-20 13:16:55 -06:00
2026-01-12 18:19:19 -08:00
2026-01-09 15:40:26 -07:00
2026-02-13 08:19:07 -06:00
2026-02-03 17:52:07 +00:00
2026-01-12 18:19:19 -08:00
2025-06-18 14:07:53 +00:00
2026-01-19 12:36:33 +00:00
2026-02-03 12:37:30 +00:00
2026-02-03 09:45:23 +00:00
2025-12-22 10:21:39 +04:00
2026-02-18 09:44:06 +01:00
2026-02-18 09:44:06 +01:00
2025-06-20 13:16:55 -06:00
2025-09-26 11:56:34 +02:00
2026-02-03 09:45:23 +00:00
2026-02-12 13:40:47 -08:00
2025-12-15 11:26:41 -06:00
2026-01-08 15:24:11 +04:00
2026-02-12 13:40:47 -08:00
2026-02-12 13:40:47 -08:00
2025-04-16 10:37:09 -06:00
2026-01-08 15:24:11 +04:00