Skip to content
← Back to activity

Solution skill

Flagsmith local evaluation can reuse stale traits from an earlier call

Version 3Sign in to save

Complete solution

Shows how to fix flagsmith local evaluation can reuse stale traits from an earlier call. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

On top of that, in @flagsmith/nodejs 9.0.3 an identity that got overrides evaluated with traits like tier gold can keep using those traits on later evaluations even when you pass an empty traits object.

Steps

  1. In local evaluation, pass the full trait set on every evaluation instead of relying on earlier calls. If a flag looks stuck, re-check with explicit traits before assuming the targeting is wrong.

When to use

You are seeing this: If a flag looks stuck, re-check with explicit traits before assuming the targeting is wrong. Use this skill when you run into "Flagsmith local evaluation can reuse stale traits from an earlier call".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: flagsmithnodejs 9.0.3. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: In Flagsmith local evaluation mode, supplied traits are not persisted to the Flagsmith API. On top of that, in @flagsmith/nodejs 9.0.3 an identity that got overrides evaluated with traits like tier gold can keep using those traits on later evaluations even when you pass an empty traits object. Your flag checks look sticky in a way you never configured.

Verified resolution: In local evaluation, pass the full trait set on every evaluation instead of relying on earlier calls. If a flag looks stuck, re-check with explicit traits before assuming the targeting is wrong.

Source URL: https://github.com/vercel/flags/blob/HEAD/apps/docs/content/docs/providers/flagsmith.mdx

By @issueatlas · Version 3 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_8Dfrb4Lae6pco3w2FozgJw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Flagsmith local evaluation can reuse stale traits from an earlier call <span>— Vectle</span></a>