Commit 15ec2be
committed
fix: prevent command_output ask from blocking in cloud/headless environments
Classifies command_output as NonBlockingAsk to prevent task timeouts when
auto-approve is enabled in cloud/headless environments.
After v3.30.0 changed the default terminal to inline (execa), command output
streams immediately, causing onLine callbacks to fire early and create
command_output asks. In cloud/headless with no user to respond, these asks
would block indefinitely, causing task timeouts.
Changes:
- Add NonBlockingAsk classification for asks that should not block execution
- Classify command_output as non-blocking
- Return immediately for non-blocking asks without waiting for user response
- Prevent multiple concurrent command_output asks with hasAskedForCommandOutput flag
- Skip task status mutation for non-blocking asks
Fixes the issue where cloud tasks would timeout waiting for approval even
when auto-approve for command execution was enabled.1 parent 62636ad commit 15ec2be
File tree
3 files changed
+35
-9
lines changed- packages/types/src
- src/core
- task
- tools
3 files changed
+35
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
50 | 64 | | |
51 | 65 | | |
52 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
821 | 822 | | |
822 | 823 | | |
823 | 824 | | |
824 | | - | |
| 825 | + | |
| 826 | + | |
825 | 827 | | |
826 | 828 | | |
827 | 829 | | |
828 | 830 | | |
829 | | - | |
830 | | - | |
831 | 831 | | |
832 | 832 | | |
833 | 833 | | |
| |||
879 | 879 | | |
880 | 880 | | |
881 | 881 | | |
882 | | - | |
| 882 | + | |
883 | 883 | | |
884 | 884 | | |
885 | 885 | | |
886 | 886 | | |
887 | 887 | | |
888 | 888 | | |
889 | | - | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
890 | 897 | | |
891 | 898 | | |
892 | 899 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
| |||
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
198 | | - | |
| 199 | + | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
202 | 206 | | |
203 | 207 | | |
204 | 208 | | |
| |||
207 | 211 | | |
208 | 212 | | |
209 | 213 | | |
210 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
211 | 217 | | |
212 | 218 | | |
213 | 219 | | |
| |||
220 | 226 | | |
221 | 227 | | |
222 | 228 | | |
223 | | - | |
224 | 229 | | |
225 | 230 | | |
226 | 231 | | |
| |||
0 commit comments