Repository navigation
fix(engine): preserve prompt cache prefix with skill hook context - #205
Putluru Sandeep (sunny-kavixo) wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Initial source review of f0cbfeb: stable, request-only hook-context batches within an Amplifier Agent turn avoid rebuilding the cached prompt prefix on every iteration. Placement belongs in the engine/context owner; additions must respect unanswered tool calls. Stability is within a turn, not across deliberate turn-boundary resets.
The review requested coverage for repeated compaction, set_messages/clear, and successful, failed, and cancelled execute cleanup, plus resolution of the base conflict. Those requests were addressed in a7757a0; see the subsequent technical approval for independently run validation. These checks guard against stale anchors and cross-turn context leakage for Amplifier Agent consumers.
There was a problem hiding this comment.
Technical review complete on a7757a0. I resolved the main conflict and added the reset-path and turn-lifecycle coverage requested in the previous review, retaining the original contribution and main's current reasoning behavior.
The independent DTU run passed 967 engine/Python/HTTP tests. The final hosted run passed prek, the runtime build, 1,119 Python tests, 85 TypeScript tests, and package builds: https://github.com/microsoft/amplifier-agent/actions/runs/38381430373.
The request-only placement and turn scope match the intended engine ownership. No remaining technical change is requested. The contributor’s license/cla check now passes as well.
|
@microsoft-github-policy-service agree |
|
Thank you for your technical review and validation of PR #205. I completed a fresh local merge-readiness audit against the updated I've prepared and locally validated a minimal resolution without modifying the production implementation. Before updating the contributor branch, could you please confirm whether you would prefer me to push the conflict resolution or have a maintainer resolve the changelog conflict during integration? I want to preserve the existing review and avoid unnecessary branch updates. Thank you for your guidance. |
|
I hope you're doing well. Thank you again for your technical review, approval, and the independent validation of PR #205. I really appreciate your time and guidance. I wanted to follow up on the remaining steps toward merging this contribution. I noticed the PR is still open and GitHub reports a conflict in Could you please let me know if there are any outstanding technical concerns, additional changes, or maintainer requirements I should address? I've already prepared a minimal local resolution for the changelog conflict, and I'm happy to push it if you'd prefer me to handle that on the contributor branch. Alternatively, I can leave the resolution to the maintainers during integration. I'm keen to make sure the contribution meets the project's standards and can move forward without creating unnecessary work for the team. Thank you again for your support and consideration. Best regards, |
|
Rebased on the latest main and resolved the Thank you for the technical review and approval. Ready for merge whenever convenient. |
Signed-off-by: Sunny <sandeepkisan1432@gmail.com>
|
Updated the contributor branch with merge commit Local validation after the merge: focused regression tests |
Improves Amplifier Agent’s within-turn prompt-prefix stability for request-only hook context.
Skill-hook context was appended as one aggregate to each provider request. New conversation messages moved that aggregate, breaking the growing prompt prefix after compaction. The engine now anchors request-only context batches where they first become active, appends new batches after completed tool results, and resets placement after compaction, history replacement/clearing, or a turn boundary. Context and compaction notices stay out of canonical history.
Prefix stability applies within a turn between compactions. Hook context deliberately expires when the turn succeeds, fails, or is cancelled.
Validation on
a7757a0c26676520cd08c205eedccc8d2796ddc9, merged with mainec691a2feed5a628b2c54ad5b370defbb8a85f13:prek run --all-files,scripts/check.py --runtime, and source/wheel builds using the pinned toolchain.These tests verify request construction and lifecycle behavior. They do not measure live-provider cache-hit rates, billing or latency.
The hosted technical checks and
license/clacheck pass. Merge remains a decision for the Amplifier Agent maintainers.