agents-consilium: recent update reintroduced multiple Windows/MSYS compatibility breaks (fcntl, os.getuid, CRLF-in-python3-c, POSIX-only Popen)
Summary
agents-consilium was working correctly on Windows (Git Bash / MSYS2) after a set of local patches applied ~2026-07-31. A subsequent skill update reintroduced the exact same defect classes, breaking review code end-to-end again. The skill is vendored (not a git submodule/repo), so local patches have no way to survive an update — every update is a fresh regression risk for any non-Linux/macOS user.
Environment
- Windows 11, Git Bash (MSYS2),
python3= native Windows Python (not MSYS python) - Skill installed via the
ai-driven-developmentmarketplace plugin at~/.claude/skills/agents-consilium(junction to~/.agents/skills/agents-consilium)
Reproduction (primary break)
bash scripts/consilium review code --depth basic <any-file>
Result:
Error: unknown agent id: grok
Error: unknown agent id: opencode-go-kimi-k3
[grok.security] failed (exit 4)
[opencode-go-kimi-k3.correctness] failed (exit 4)
Both agent ids are correct and present in config.json — the ids "unknown" are actually grok\r and opencode-go-kimi-k3\r. Native Windows Python's print() emits \r\n; when config_enabled_agents() in scripts/lib/config.sh is consumed line-by-line (while IFS= read -r line) instead of via $( ) command substitution, the trailing CR survives and every subsequent config lookup fails to match.
Root cause: scripts/lib/config.sh's _cfg_python() helper does not force sys.stdout.reconfigure(newline='\n') before invoking the caller's Python body. This exact defect (and fix) was documented and applied locally before the update; the current release has regressed to the pre-fix state.
Fix applied locally (restores correct behavior):
_cfg_python() {
CONSILIUM_CONFIG_PATH="$CONSILIUM_CONFIG" python3 -c "
import sys
sys.stdout.reconfigure(newline='\n')
$1"
}
Other defects found in the same update, same root causes (POSIX-only assumptions), confirmed by direct code inspection against the current tree
-
scripts/lib/common.sh— missingexport PYTHONIOENCODING=utf-8. Any embedded non-ASCII character (e.g.✓incode_review_validate.py) crashes withUnicodeEncodeErroron native Windows Python, whose default stdout encoding is the console codepage, not UTF-8. -
scripts/lib/discovery-pass.shandscripts/lib/judge-runner.sh— both resolve the backend via:BACKEND="$(python3 -c " d = json.load(open('$CONSILIUM_CONFIG'))['agents'] ... ")"Same CRLF issue (a single-line
$( )capture happens to strip the final CR here, so this manifests less often, but the path/agent id are spliced directly into the Python source string — an unnecessary shell-injection surface as well as a portability issue). Recommend env-passingCONSILIUM_CONFIG/AGENTand addingsys.stdout.reconfigure(newline="\n")defensively, consistent with the_cfg_pythonfix. -
scripts/lib/dedup-findings.py—p.read_text(errors="replace")andout_path.open("w")have no explicitencoding=. On Windows this decodes/encodes through the process codepage (commonly cp1252), which silently mojibakes UTF-8 agent output (e.g. em-dash—→—) instead of failing loudly. Needsencoding="utf-8"on both,newline="\n"on the write. -
scripts/lib/steer/util.py,scripts/lib/steer/mailbox.py— unconditionalimport fcntlat module scope.fcntldoes not exist on Windows, so importing either module crashes immediately, taking down the entiresteerpackage (used bydelegate --steerable/steer/status/cancel). Needs atry: import fcntl / except ImportError:guard with anmsvcrt.locking()fallback for the lock/unlock helpers. -
scripts/lib/steer/util.py:pid_alive()— usesos.kill(pid, 0)as a liveness probe. On Windows, CPython'sos.killmaps every signal exceptCTRL_C_EVENT/CTRL_BREAK_EVENTontoTerminateProcess— so the liveness check itself kills the process it's asking about. This is actively destructive, not just a portability gap. Needs actypes.OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION)+GetExitCodeProcessimplementation onos.name == "nt".kill_process_group()has the analogous problem (os.getpgid/os.killpgdon't exist on Windows) and needs ataskkill /F /T /PIDbranch. -
scripts/lib/steer/registry.py—os.uname()(used indefault_registry_root()to detect macOS) and six unguardedos.getuid()calls. Both raiseAttributeErroron Windows before any of the intended cross-platform logic runs. Needs anos.name == "nt"branch indefault_registry_root()(e.g.%LOCALAPPDATA%/agents-consilium/steer) and a singlecurrent_uid()helper (os.getuid()on POSIX,0on Windows) used everywhere instead of rawos.getuid(). -
scripts/lib/steer/jsonrpc.py:JsonRpcProcess.start()—subprocess.Popen(self.argv, ..., start_new_session=True).start_new_sessionis POSIX-only and raises on Windows. Separately,self.argv[0]is never resolved throughshutil.which(), so npm-style.cmd/.batshims (how most Node-based CLIs install on Windows) and shebang scripts both fail withWinError 193 (%1 is not a valid Win32 application)— this is the reason the entire steerable-supervisor test suite (42 failures, all in one block, per local test runs before the update) could not execute at all on Windows.
Suggested process fix (not just a code fix)
The skill is vendored inside the plugin (no .git in the skill directory), so any local fix is silently discarded on update with no diff, no changelog entry, and no warning. Two suggestions:
- Add a note to
SKILL.md/README that Windows support is best-effort / community-patched, so users know to expect this. - Consider a CI job (even a minimal one, e.g. GitHub Actions
windows-latestrunner + Git Bash) that at minimum imports everyscripts/lib/*.pymodule and runsconfig_enabled_agents/review code --depth basic --help— this would have caught defects #1, #4, #5, and #6 immediately (import-time failures), which are the highest-severity ones (the package doesn't even load).
Offer
I have working local patches for all 7 items above (developed and diff-tested against the current tree, not just the July version) and I'm happy to open a PR if that's useful — let me know if you'd rather I submit one directly instead of/in addition to this issue.
Yes, feel free to open a PR and tag me. Thanks you.
Opened #7 with all 7 items from this report, @rodion-m.
Two commits, easy to split:
Fix Windows/MSYS compatibility in agents-consilium— the 7 defects (config CRLF, PYTHONIOENCODING, env-passed backend resolution, dedup encoding,fcntlguard, destructivepid_alive,os.getuid/os.uname, POSIX-onlyPopen).Add cross-platform smoke CI—ubuntu-latest+windows-latest; drop it if you'd rather not take CI.
Patches were rebased onto current main, so the delegate events work added after my local base is untouched. POSIX paths are unchanged — every branch is gated on os.name == \"nt\" or on fcntl being importable. Verified on Windows 11 / Git Bash with native Windows Python; output is in the PR description.