fix(agent): strip _flush_sentinel from API messages#227
fix(agent): strip _flush_sentinel from API messages#227teknium1 merged 1 commit intoNousResearch:mainfrom
Conversation
|
Merged — thanks for the fix! Had to resolve merge conflicts (stale branch) and fix the test: |
Thanks for fixing the test mock target 👍 |
🔄 Started Work on Issue #227Branch: Investigation Plan
Will update with findings and fix. |
✅ FixedChanges MadeFixed the Before:
After:
Code Changes// Initialize with false for SSR consistency
const [isMobile, setIsMobile] = React.useState<boolean>(false)
const [mounted, setMounted] = React.useState(false)
React.useEffect(() => {
setMounted(true)
// ... detection logic
}, [])
// Return consistent values during SSR and initial render
return mounted ? isMobile : falseVerification
The 503 errors visible in console are from API endpoints (Issue #231), unrelated to hydration. Commit
|
Added
api_msg.pop("_flush_sentinel", None)next to the existingapi_msg.pop("reasoning", None)in the flush API message building loop. This strips the internal marker before sending messages to the API.Test
Added
TestFlushSentinelNotLeakedtotests/test_run_agent.pythat verifies no message sent to the API contains_flush_sentinel. Test confirmed the leak exists without the fix and passes with it.Closes #226