Commit 46989c1
committed
fix local codex review comment:
- [P0] Respect sessionInputCallback redactions — packages/agents-core/src/runImplementation.ts:1986-1992
If a session input callback intentionally omits or redacts the new turn inputs (e.g. it returns only the prior history to avoid persisting sensitive data), we
should not write the raw inputs to the session. However, when appended.length === 0 this code falls back to newInputSnapshot, so we still persist the original turn
items even though the callback removed them. This leaks exactly the data the developer tried to drop, defeating the purpose of the callback. Please respect the
callback’s decision by persisting nothing (or only the items it returned) when no new items were appended.1 parent 72ac1dc commit 46989c1
File tree
3 files changed
+24
-10
lines changed- packages/agents-core
- src
- test
3 files changed
+24
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
| 496 | + | |
496 | 497 | | |
497 | 498 | | |
498 | 499 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1908 | 1908 | | |
1909 | 1909 | | |
1910 | 1910 | | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
1911 | 1917 | | |
1912 | 1918 | | |
1913 | 1919 | | |
| |||
1919 | 1925 | | |
1920 | 1926 | | |
1921 | 1927 | | |
| 1928 | + | |
1922 | 1929 | | |
1923 | 1930 | | |
1924 | 1931 | | |
| |||
1985 | 1992 | | |
1986 | 1993 | | |
1987 | 1994 | | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
1988 | 2004 | | |
1989 | | - | |
1990 | | - | |
1991 | | - | |
1992 | | - | |
1993 | | - | |
1994 | | - | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
1995 | 2009 | | |
1996 | 2010 | | |
1997 | 2011 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
555 | | - | |
| 555 | + | |
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
| |||
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
577 | | - | |
| 577 | + | |
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
582 | | - | |
583 | | - | |
| 582 | + | |
584 | 583 | | |
585 | 584 | | |
586 | 585 | | |
| |||
0 commit comments