You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cloud: updating an agent's system does not recompile the in-context system message #3446
On Letta Cloud (api.letta.com, client @letta-ai/letta-client 1.12.1), PATCH /v1/agents/{id} with a new system updates the agent record but the system message the model actually receives is unchanged: the oldest message of the agent (role system) still carries the previous prompt, and the Anthropic prompt-cache figures on later turns show the same cached prefix.
Repro
Create an agent with system = prompt A (ours contains a unique marker sentence per version).
Send a few messages so the agent has history.
client.agents.update(agentId, { system: promptB }) → GET /v1/agents/{id} returns system = prompt B (2,158 chars in our case).
GET /v1/agents/{id}/messages?limit=3&order=asc → the first message (message_type: system_message) is 10,829 chars and contains only prompt A's marker, not prompt B's.
Send three more messages. Each run's step usage (via runs.steps.list) shows cached_input_tokens ≈ the whole previous request (15.4k → 15.5k → 15.7k) and cache_write_tokens ≈ 120 per turn, i.e. the prefix sent to Anthropic did not change; a new system prompt would have invalidated it. The model's replies also kept following prompt A's rules and ignored prompt B's new instruction.
Observed today (19 Sep 2026) on agent agent-780de0e0-f3c5-4745-ad1c-79c7cebe68a5 (BYOK Anthropic, model handle cli-anthropic-key/claude-sonnet-5). Happy to share run ids.
Expected
Either the update recompiles the in-context system message (as memory block edits do), or the docs say system is creation-only on Cloud so callers rebuild. We now rebuild the agent from our own mirror on every prompt version bump, which works but destroys the message history.
Related
#3445 (tool_rules accepted but not persisted on Cloud).
Activity
github-actions commentedon Sep 19, 2026
This issue was automatically closed because it does not meet our submission requirements.
What failed:
To submit an issue, please:
If you believe this was a mistake, please reach out on Discord.