{"record":{"id":"2f99b343dec7d2d9","repo":"hashicorp/nomad","slug":"unsupported","errorCode":null,"errorMessage":"unsupported","messagePattern":"unsupported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","filePath":"drivers/shared/executor/pty_windows.go","lineNumber":21,"sourceCode":"\n//go:build windows\n// +build windows\n\npackage executor\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"syscall\"\n)\n\nfunc sessionCmdAttr(tty *os.File) *syscall.SysProcAttr {\n\treturn &syscall.SysProcAttr{}\n}\n\nfunc setTTYSize(w io.Writer, height, width int32) error {\n\treturn fmt.Errorf(\"unsupported\")\n\n}\n\nfunc isUnixEIOErr(err error) bool {\n\treturn false\n}\n","sourceCodeStart":3,"sourceCodeEnd":28,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/drivers/shared/executor/pty_windows.go#L3-L28","documentation":"The Windows build of the executor's PTY helpers does not implement terminal resizing; setTTYSize is a stub that always returns \"unsupported\". Any attempt to resize a terminal session on Windows produces this error.","triggerScenarios":"Calling TerminalResize (or setTTYSize) on Windows regardless of session type — the function is intentionally unimplemented on windows/amd64 builds.","commonSituations":"Cross-platform tooling that unconditionally sends resize events (SIGWINCH handlers) running against a Windows Nomad client; Windows alloc exec sessions with tty=true where the UI sends size updates.","solutions":["Gate resize calls on runtime.GOOS != \"windows\" or a capability flag from the driver","Ignore this specific error on Windows (treat resize as best-effort)","Upgrade Nomad — check release notes for Windows PTY/resize support in newer versions","Use non-TTY exec on Windows if interactive resizing is not essential"],"exampleFix":"// before\nerr := setTTYSize(w, h, width)\n// after\nif runtime.GOOS != \"windows\" {\n    err := setTTYSize(w, h, width)\n    _ = err // handle on unix\n}","handlingStrategy":"fallback","validationCode":"if runtime.GOOS == \"windows\" { skip resize }","typeGuard":null,"tryCatchPattern":"if err := session.Resize(h, w); err != nil && err.Error() == \"unsupported\" {\n    // best-effort: ignore on windows\n}","preventionTips":["Gate terminal-resize features by platform capability","Treat resize errors as non-fatal","Check Nomad release notes for Windows PTY support"],"tags":["windows","tty","unsupported-platform"],"backgroundTag":"not-supported-on-windows","analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}