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

  • Resolves #200
  • /claim #200

Claim

Total prize pool $151
Total paid $0
Status Pending
Submitted February 04, 2026
Last updated February 04, 2026

Contributors

AK

Akinniranye Samuel Tomiwa

@samuel-asleep

100%

Sponsors

CO

Coder

@coder

$150
AT

Atif Ali

@matifali

$1