For quick commands, scheduled commands and Gandalf internal commands the server relies entirely on the worker sending a command_result. Several ordinary conditions mean that never happens:
Worker at MAX_CONCURRENT_TASKS: executeCommand() logs "rejecting command" and returns without sending any result.
Worker WebSocket closes while a command runs: sendResult() silently drops the message (no queue/retry).
Worker process restarts mid-command.
In all cases the execution shows running indefinitely with a ticking elapsed counter, until someone restarts the server (the "Commands Stuck in Running – restart the server" note in the README is this bug).
server.js – waitForCommandResult() only guards workflow steps; direct commands have no server-side timer.
Suggested fix
Worker: send a command_result with success:false, error:'Worker at capacity' instead of dropping; buffer results while disconnected and flush on reconnect.
Server: record timeout on the execution and run a periodic reaper that fails executions older than their timeout (+grace); also fail in-flight executions for a worker when its socket closes.
## Overview
For quick commands, scheduled commands and Gandalf internal commands the server relies entirely on the worker sending a `command_result`. Several ordinary conditions mean that never happens:
1. Worker at `MAX_CONCURRENT_TASKS`: `executeCommand()` logs "rejecting command" and **returns without sending any result**.
2. Worker WebSocket closes while a command runs: `sendResult()` silently drops the message (no queue/retry).
3. Worker process restarts mid-command.
In all cases the execution shows `running` indefinitely with a ticking elapsed counter, until someone restarts the server (the "Commands Stuck in Running – restart the server" note in the README is this bug).
## Where
- `worker/worker.js` `executeCommand()` (capacity reject), `sendResult()`.
- `server.js` – `waitForCommandResult()` only guards workflow steps; direct commands have no server-side timer.
## Suggested fix
- Worker: send a `command_result` with `success:false, error:'Worker at capacity'` instead of dropping; buffer results while disconnected and flush on reconnect.
- Server: record `timeout` on the execution and run a periodic reaper that fails executions older than their timeout (+grace); also fail in-flight executions for a worker when its socket closes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Overview
For quick commands, scheduled commands and Gandalf internal commands the server relies entirely on the worker sending a
command_result. Several ordinary conditions mean that never happens:MAX_CONCURRENT_TASKS:executeCommand()logs "rejecting command" and returns without sending any result.sendResult()silently drops the message (no queue/retry).In all cases the execution shows
runningindefinitely with a ticking elapsed counter, until someone restarts the server (the "Commands Stuck in Running – restart the server" note in the README is this bug).Where
worker/worker.jsexecuteCommand()(capacity reject),sendResult().server.js–waitForCommandResult()only guards workflow steps; direct commands have no server-side timer.Suggested fix
command_resultwithsuccess:false, error:'Worker at capacity'instead of dropping; buffer results while disconnected and flush on reconnect.timeouton the execution and run a periodic reaper that fails executions older than their timeout (+grace); also fail in-flight executions for a worker when its socket closes.