Linux: TaskStart Bash hook remains running and contextModification is not applied
Cline Surface
VSCode Extension
Cline Version
4.0.12
Note: I'm obliged to uses 4.0.12 as in more recent versions, hooks are failing to modify context (see linked issues)
What happened?
TaskStart behaves differently on Windows and Linux with the same Cline version.
Steps to reproduce
Windows / PowerShell → TaskStart starts → hook completes → contextModification is applied → initial user request is processed
Linux / Bash → TaskStart starts → hook produces valid JSON and exits with code 0 → hook remains "running" → initial user request is processed → contextModification is NOT applied
Provider/Model
openAI compatible
Diagnostics
Interestingly, the contextModification content is visible in the Cline UI on Linux, but it is not present in the context used for the initial model request.
Expected
Cline should wait for the Linux TaskStart process to complete, then apply its contextModification before processing the initial user request.
Suspected area
This looks like a Linux/Unix hook lifecycle issue rather than a Bash/JSON issue.
Could the Unix implementation be failing to detect process completion / EOF, causing the hook result not to be resolved before the initial request is processed?
Related #13822 — TaskStart / contextModification not injected: https://github.com/cline/cline/issues/13822 #9337 — hook remains Running: https://github.com/cline/cline/issues/9337
System Information
Ubuntu/bash
Source: cline/cline