Repository navigation
Commit 1f89f52
committed
fix(server): keep the authoritative subagent model when snapshots race task_started
The agent panel sometimes labelled a spawned Claude subagent with the session's
model instead of the one it ran on. task_started seeds the task's model from the
launching Agent tool's parsed input and falls back to the session model, and the
only correction was the subagent's own assistant snapshot, whose authoritative
message.model was dropped whenever the snapshot arrived before the task was
registered.
Snapshots that cannot resolve their parent_tool_use_id to a registered task now
park their model in a small bounded per-session map, and task_started prefers
that buffered value over the launch-time seed. Later snapshots still refine the
record in place, so the corrected model rides every subsequent linkage row.1 parent 4347f14 commit 1f89f52
2 files changed
Lines changed: 136 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1834 | 1834 | | |
1835 | 1835 | | |
1836 | 1836 | | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
1837 | 1915 | | |
1838 | 1916 | | |
1839 | 1917 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
244 | 270 | | |
245 | 271 | | |
246 | 272 | | |
| |||
262 | 288 | | |
263 | 289 | | |
264 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
265 | 297 | | |
266 | 298 | | |
267 | 299 | | |
| |||
2878 | 2910 | | |
2879 | 2911 | | |
2880 | 2912 | | |
2881 | | - | |
2882 | | - | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
2883 | 2925 | | |
2884 | 2926 | | |
2885 | 2927 | | |
| |||
3193 | 3235 | | |
3194 | 3236 | | |
3195 | 3237 | | |
3196 | | - | |
3197 | | - | |
3198 | | - | |
| 3238 | + | |
| 3239 | + | |
| 3240 | + | |
| 3241 | + | |
3199 | 3242 | | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
3200 | 3248 | | |
3201 | | - | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
3202 | 3252 | | |
3203 | 3253 | | |
3204 | 3254 | | |
| |||
3803 | 3853 | | |
3804 | 3854 | | |
3805 | 3855 | | |
| 3856 | + | |
3806 | 3857 | | |
3807 | 3858 | | |
3808 | 3859 | | |
| |||
4266 | 4317 | | |
4267 | 4318 | | |
4268 | 4319 | | |
| 4320 | + | |
4269 | 4321 | | |
4270 | 4322 | | |
4271 | 4323 | | |
| |||
0 commit comments