Skip to content

feat: add RDP keep-alive to windows-rdp module#697

Draft
samuel-asleep wants to merge 1 commit intocoder:mainfrom
samuel-asleep:main
Draft

feat: add RDP keep-alive to windows-rdp module#697
samuel-asleep wants to merge 1 commit intocoder:mainfrom
samuel-asleep:main

Conversation

@samuel-asleep
Copy link

@samuel-asleep samuel-asleep commented Feb 4, 2026

Description

Adds optional keep-alive functionality to automatically extend workspace sessions during active RDP connections. Uses background PowerShell script to monitor port 3389 and reports activity via coder stat connectivity.

Type of Change

  • Feature/enhancement

Module Information

Path: registry/coder/modules/windows-rdp
New version: v1.4.0
Breaking change:

  • Yes
  • No

Changes

Variables:

  • keepalive (bool, default: false) - enables RDP connection monitoring
  • keepalive_interval (number, default: 300) - check interval in seconds

Implementation:

  • Conditional coder_script resource spawns background PowerShell process
  • Monitors Get-NetTCPConnection -LocalPort 3389 -State Established
  • Invokes coder stat connectivity on active connections to extend deadline
  • Uses start_blocks_login = false to avoid delaying workspace startup

Tests:

  • Terraform tests verify conditional resource creation
  • TypeScript tests validate script generation and interval configuration

Usage

module "windows_rdp" {
  source             = "registry.coder.com/coder/windows-rdp/coder"
  version            = "1.4.0"
  agent_id           = coder_agent.main.id
  keepalive          = true
  keepalive_interval = 300
}

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun fmt)
  • Changes tested locally

Issues/claim

@matifali
Copy link
Member

matifali commented Feb 4, 2026

@samuel-asleep, please attach a video demoing this as described in #213

@samuel-asleep
Copy link
Author

@matifali OK will do, but In the meantime I'll convert this pr to draft

@samuel-asleep samuel-asleep marked this pull request as draft February 4, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows RDP Keep Alive - Extend workspace sessions during active RDP connections

2 participants