feat(workspace): log workspace and agent state changes - #1075
Open
aqandrew wants to merge 1 commit into
Open
Conversation
aqandrew
force-pushed
the
aqandrew/devex-661-connection-state-logs
branch
from
August 12, 2026 22:00
a1a27aa to
163a89b
Compare
aqandrew
force-pushed
the
aqandrew/devex-661-connection-state-logs
branch
from
August 13, 2026 00:40
163a89b to
082b4bb
Compare
EhabY
reviewed
Aug 13, 2026
| * several. Construct one per workspace; `WorkspaceMonitor` is the sole call | ||
| * site. | ||
| */ | ||
| export class WorkspaceStateLogger { |
Collaborator
There was a problem hiding this comment.
There are lots of similarities between this and WorkspaceStateTelemetry, I suppose one is tracking the workspace states and one is tracking the agent states?
Comment on lines
+63
to
+65
| previous?.workspaceStatus === next.workspaceStatus && | ||
| previous?.agentStatus === next.agentStatus && | ||
| previous?.lifecycleState === next.lifecycleState |
Collaborator
There was a problem hiding this comment.
IMO I think we should log once for each workspace state change (basically what the workspace telemetry does) and independently track the agent state since they could be independent
aqandrew
force-pushed
the
aqandrew/devex-661-connection-state-logs
branch
from
August 13, 2026 18:46
082b4bb to
163a89b
Compare
Add WorkspaceStateLogger, which logs workspace, agent, and lifecycle status transitions at info level with the old and new values. Wire it into WorkspaceMonitor so state changes observed while tracking a workspace are recorded (tagged with the session ID) for connection debugging.
aqandrew
force-pushed
the
aqandrew/devex-661-connection-state-logs
branch
from
August 13, 2026 20:26
163a89b to
d29fcbd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes DEVEX-666
What
Add info-level logging of workspace, agent, and lifecycle status transitions so
connection debugging has a record of state changes — correlated by the session
ID from #1073.
This is Phase 3 of 3 for
DEVEX-661 (RFC req 7). It builds
on #1074.
Changes
WorkspaceStateLogger(src/workspace/workspaceStateLogger.ts), whichlogs at
infowhen a workspace's status, an agent's status, or an agent'slifecycle state changes, including the workspace name and old → new values.
State is tracked per agent (keyed by agent ID) since a workspace can have
several.
WorkspaceMonitor.update(), alongside the existing telemetryobserver, so transitions observed while tracking a workspace are recorded.
Testing
pnpm typecheck, targetedpnpm lint, fullpnpm test:extension(2108passing).
nothing changes, handles the no-agent case, and tracks agents independently.
🤖 Generated by Coder Agents.