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
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>
|
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)
📝 WalkthroughWalkthroughModified system prompt tracing in the session loop to track the current agent and re-trace whenever the agent changes, rather than only on the first step. This fixes an issue where subsequent agents in multi-agent sessions had their system prompts skipped during tracing. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 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 |
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