Commit 909d6c7
committed
fix: replay queued cloud messages via resume on terminal status
When a follow-up was queued during the final turn of a cloud run, the
terminal-status branch in handleCloudTaskUpdate silently dropped it —
the auto-flush above had also raced ahead with sendCloudPrompt against
a now-finished run, so the user_message command never reached the cloud.
Skip the auto-flush when this update brings the run terminal, and have
the terminal-status branch dequeue any pending messages and replay them
via resumeCloudRun (which spins up a fresh task run carrying the prompt
as pending_user_message).
Generated-By: PostHog Code
Task-Id: 8aeaf6f9-8b18-426a-9453-c668ca17d2271 parent 09c791f commit 909d6c7
2 files changed
Lines changed: 93 additions & 7 deletions
Lines changed: 63 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
915 | 916 | | |
916 | 917 | | |
917 | 918 | | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
918 | 981 | | |
919 | 982 | | |
920 | 983 | | |
| |||
Lines changed: 30 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2924 | 2924 | | |
2925 | 2925 | | |
2926 | 2926 | | |
2927 | | - | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
| 2931 | + | |
| 2932 | + | |
| 2933 | + | |
| 2934 | + | |
2928 | 2935 | | |
2929 | 2936 | | |
| 2937 | + | |
2930 | 2938 | | |
2931 | 2939 | | |
2932 | 2940 | | |
| |||
2968 | 2976 | | |
2969 | 2977 | | |
2970 | 2978 | | |
2971 | | - | |
2972 | 2979 | | |
2973 | | - | |
2974 | | - | |
2975 | | - | |
2976 | | - | |
2977 | | - | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
| 2988 | + | |
| 2989 | + | |
| 2990 | + | |
| 2991 | + | |
| 2992 | + | |
| 2993 | + | |
| 2994 | + | |
| 2995 | + | |
| 2996 | + | |
| 2997 | + | |
| 2998 | + | |
| 2999 | + | |
| 3000 | + | |
2978 | 3001 | | |
2979 | 3002 | | |
2980 | 3003 | | |
| |||
0 commit comments