Commit f527431
committed
fix(session): also persist approve-tool grants synchronously
The Persist-on-resume switch symmetry: approve-safe / approve-safer /
approve-session mutate session state and are now persisted here.
approve-tool mutates session.Permissions.Allow with the same
lifetime characteristics, and needs the same treatment or its
in-turn grant is silently dropped by the next OnRunStart cycle
(or a mid-turn process restart).
Skip the persist when toolName is empty — the dispatcher's fallback
to the pending tool call's name isn't reachable from here, so the
mutation happens in-runtime as before but doesn't get the durable
write.1 parent 458b780 commit f527431
1 file changed
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
919 | 919 | | |
920 | 920 | | |
921 | 921 | | |
922 | | - | |
923 | | - | |
924 | | - | |
925 | | - | |
926 | | - | |
| 922 | + | |
| 923 | + | |
927 | 924 | | |
928 | 925 | | |
929 | 926 | | |
| |||
936 | 933 | | |
937 | 934 | | |
938 | 935 | | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
939 | 943 | | |
940 | 944 | | |
941 | 945 | | |
| |||
1156 | 1160 | | |
1157 | 1161 | | |
1158 | 1162 | | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
| 1163 | + | |
| 1164 | + | |
1162 | 1165 | | |
1163 | 1166 | | |
1164 | 1167 | | |
| |||
0 commit comments