Skip to content

Cloud: updating an agent's system does not recompile the in-context system message #3446

Closed

Description

@nicksgoat

Summary

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

  1. Create an agent with system = prompt A (ours contains a unique marker sentence per version).
  2. Send a few messages so the agent has history.
  3. client.agents.update(agentId, { system: promptB }) → GET /v1/agents/{id} returns system = prompt B (2,158 chars in our case).
  4. 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.
  5. 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

  1. github-actions commented on Sep 19, 2026

    @github-actions
    Contributor

    This issue was automatically closed because it does not meet our submission requirements.

    What failed:

    • Missing exact repository acknowledgment phrase
    • Anti-Spam Acknowledgment checkbox not checked
    • Select exactly one Third-Party Product Disclosure option
    • Relationship to Third-Party Product or Service is required
    • AI Policy acknowledgment checkbox not checked
    • Select exactly one authorship option (human-written or AI-assisted)
    • AI Tool(s) Used must list every tool used, or state None

    To submit an issue, please:

    1. Use one of the issue templates
    2. Complete the Third-Party Product Disclosure and relationship field
    3. Accept the Anti-Spam Acknowledgment
    4. Select exactly one AI Disclosure authorship option
    5. Name every AI tool used, or state None
    6. Copy the Repository Acknowledgment phrase exactly as shown
    7. Read our AI Policy and AGENTS.md

    If you believe this was a mistake, please reach out on Discord.

  2. locked as spam and limited conversation to collaborators on Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions