Reuse guardian session across approvals (#14668)

## Summary
- reuse a guardian subagent session across approvals so reviews keep a
stable prompt cache key and avoid one-shot startup overhead
- clear the guardian child history before each review so prior guardian
decisions do not leak into later approvals
- include the `smart_approvals` -> `guardian_approval` feature flag
rename in the same PR to minimize release latency on a very tight
timeline
- add regression coverage for prompt-cache-key reuse without
prior-review prompt bleed

## Request
- Bug/enhancement request: internal guardian prompt-cache and latency
improvement request

---------

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Charley Cunningham
2026-03-15 22:56:18 -07:00
committed by GitHub
parent ba463a9dc7
commit 6fdeb1d602
26 changed files with 3132 additions and 1504 deletions

View File

@@ -395,6 +395,9 @@
"fast_mode": {
"type": "boolean"
},
"guardian_approval": {
"type": "boolean"
},
"image_detail_original": {
"type": "boolean"
},
@@ -473,9 +476,6 @@
"skill_mcp_dependency_install": {
"type": "boolean"
},
"smart_approvals": {
"type": "boolean"
},
"sqlite": {
"type": "boolean"
},
@@ -1944,6 +1944,9 @@
"fast_mode": {
"type": "boolean"
},
"guardian_approval": {
"type": "boolean"
},
"image_detail_original": {
"type": "boolean"
},
@@ -2022,9 +2025,6 @@
"skill_mcp_dependency_install": {
"type": "boolean"
},
"smart_approvals": {
"type": "boolean"
},
"sqlite": {
"type": "boolean"
},