fix: re-trace system prompt on agent switch#548
fix: re-trace system prompt on agent switch#548VJ-yadav wants to merge 1 commit intoAltimateAI:mainfrom
Conversation
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughSession prompt tracing now tracks the most-recently traced agent and re-traces the system prompt whenever the active agent changes, instead of only tracing on the loop's first step. This ensures each agent's system prompt is logged once when it becomes active. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The `step === 1` guard only traced the first agent's system prompt because `step` increments continuously and is never reset on agent switches. Track the last-traced agent name so subsequent agents also get their system prompts logged. Fixes AltimateAI#291 Co-Authored-By: Vijay Yadav <vijay@studentsucceed.com>
89b8cbc to
3b691b5
Compare
❌ Tests — Failures DetectedTypeScript — 15 failure(s)
cc @VJ-yadav |
Summary
step === 1guard inprompt.tsonly traced the first agent's system prompt becausestepincrements continuously and is never reset on agent switchestracedAgentvariable to track the last-traced agent name, so each agent's system prompt is logged when it first becomes activeFixes #291
Test Plan
prompt.ts(pre-existing test file failures are unrelated)Checklist
Summary by CodeRabbit