agmsgd (v1.6.0-rc.1): Windows Task Scheduler flag conversion and bash.exe resolution (isolated tests)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- bash
- Domain
- devops
Research direction
Start in scripts/daemon.sh at the _register_windows function, which builds the schtasks /Create call and the task XML whose Command is bash.exe. Reproduce on native Windows from Git Bash: check whether /Create is mangled into a path, and which bash.exe the scheduled task launches. Done when a test task registers without error and starts Git for Windows' bash rather than System32's. This needs a Windows machine because WSL and System32 resolution are involved.
Written by the indexing model from the issue text.
Description
Using the Windows registration code from upstream v1.6.0-rc.1 (54d6e24), I observed two issues in isolated checks on native Windows.
I could not reach this code through agmsg daemon enable itself because it stopped earlier at the install-generation check; see #1608. The checks below are not an end-to-end reproduction of enable.
Related: #1529.
Environment
Windows 11 (10.0.26300.9457), Git for Windows 2.54.0 (GNU bash 5.3.9), and WSL 3.0.3 with a distribution installed.
1. /Create was converted to a path when called from Git Bash
I extracted rc.1's _register_windows function and invoked it from Git Bash, changing only the task name to a unique test name.
It failed before registering the task:
ERROR: Invalid argument/option - 'C:/Program Files/Git/Create'.
The /Create option had been converted to a filesystem path by MSYS argument conversion.
2. A separate task using bare bash.exe launched System32's bash.exe on this machine
The task XML in rc.1 uses:
<Command>bash.exe</Command>
I registered a separate test task through the Task Scheduler COM API with Action.Path = 'bash.exe' and a trivial command, then started it.
CIM observations showed C:\Windows\System32\bash.exe running, and wsl.exe / wslhost.exe appeared.
In an interactive shell, Get-Command bash.exe -All listed Git's bash first, followed by System32's and WindowsApps' entries. I did not investigate why the task resolved a different executable.
This checked executable resolution for a separate task, not an end-to-end launch of agmsgd.
Possible directions — not tested
Possible directions are excluding the schtasks option prefixes from MSYS argument conversion, for example with MSYS2_ARG_CONV_EXCL, while keeping the XML path usable by native schtasks; and using an absolute Git Bash path in the task action.
I have not tested either change.
Scope and cleanup
I have not rerun these checks on integration/agmsgd-beta (95a2bf2). Source inspection only: <Command>bash.exe</Command> and the /Create invocation are unchanged at that commit.
Cleanup: two test tasks were deleted, and the processes I could observe had exited. Short-lived processes between samples and processes inside the WSL guest were not tracked.
Source:
https://github.com/fujibee/agmsg/blob/54d6e24e6c0d559eada7557867caaecb0935ca9e/scripts/daemon.sh
(Drafted with AI assistance — Claude Code.)
- Dominant language
- Shell
- Stars
- 1.5k
- Forks
- 156
- Avg merge
- 19h 30m
- Merged PRs (30d)
- 212
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fujibee/agmsg
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
plugin install: the confirmation hint names 'agmsg' even for an install with another --cmd nameOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
Similar issues
-
Update migenOpen
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
YosysHQ/oss-cad-suite-build#220 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
docker-library/redmine#430 ·
-
fm-spawn: isolation timeout hides the real treehouse get error and closes the pane that holds itOpen
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
kunchenguid/firstmate#7848 ·
Maintainers usually reply within 1 day
-
DEV: partitioner only creates next month, so one failed run leaves a month with no partitionPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
docs: state the LF Projects antitrust policy in the repositoryPossibly taken @vinoo999 claimed this today. Open
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
a2aproject/A2A#2394 ·
Maintainers usually reply within 3 days