Best Practices for Building Long‑Running Claude Fable 5 Agents
The leaked 1585‑line Claude Fable 5 system prompt reveals a full operating system for long‑running agents, detailing tool definitions, strict copyright limits, three‑layer file semantics, persistent artifact storage, MCP flow, and Claudeception, all enforced by hard‑coded rules.
Overview
The Claude Fable 5 system prompt, recently leaked (1585 lines, ~120 KB), is not a simple prompt template but an operating system for long‑running agents. It defines built‑in tools, a sandboxed file system, persistent storage, API connector flows, search and copyright‑compliance pipelines.
Prompt Composition
Rough line‑count breakdown:
~46% tool definitions (≈735 lines) – e.g., bash_tool, create_file, view, str_replace, fetch_sports_data, image_search, places_map_display, places_search, recipe_display, recommend_claude_apps, search_mcp_registry, suggest_connectors, weather_fetch, web_fetch, web_search, ask_user_input_v0, present_files, message_compose_v1.
~10% Claudeception – calls to /v1/messages using Sonnet 4, max_tokens locked at 1000.
~9% behavior / tone rules – voice notes, no HTML forms, legal/financial/medical boundaries.
~9% search + copyright constraints – each source may be quoted at most once, no more than 15 characters per quote; violations trigger SEVERE VIOLATION .
~8% computer‑use rules – Ubuntu sandbox, three‑layer directory conventions, /mnt/skills/public hosts docx/pptx/xlsx etc.
~5% artifact persistence – window.storage.get / set / list / delete, 5 MB per key, key name ≤200 chars, shared defaults to false.
Tools dominate the prompt, but they describe *what* the tools are, when they may be used, and which defaults are prohibited, effectively providing a menu rather than a recipe.
Six Hard Rules
01 – 15‑character quote limit
Each retrieved source may be quoted only once and the quote must be ≤15 characters. Exceeding this triggers SEVERE VIOLATION . The prompt repeatedly states: "Claim must be in your own words, never exact quoted text."
02 – Skill priority
Before creating any file, the model must view the corresponding SKILL.md. This is mandatory, not optional; even if the model thinks it knows how to generate a PPTX, it must first inspect the skill definition.
03 – MCP three‑step flow
Every third‑party MCP connector call must follow:
search_mcp_registry → suggest_connectors → user selects → call. The model cannot auto‑select a connector.
04 – Three‑layer directory semantics
/mnt/user-data/uploads– read‑only user uploads. /home/claude – draft area, invisible to the user. /mnt/user-data/outputs – delivery area, visible to the user, only final artifacts may be placed here.
Writing drafts to outputs or calling present_files inappropriately counts as a violation.
05 – Artifact persistence
Artifacts can persist across sessions via window.storage.get / set / list / delete. Each key holds up to 5 MB, key names are limited to 200 characters, and shared defaults to false, enabling cross‑session todo lists, leaderboards, or trackers.
06 – Claudeception
Within an artifact the agent may invoke Anthropic again via /v1/messages, locked to claude‑sonnet‑4 with max_tokens=1000. The prompt includes full examples such as base64‑encoded PDF/image handling, enabling web_search, and merging MCP tool_result back into the conversation history.
Scope of the Prompt
The leaked prompt applies only to the Claude.ai chat‑app UI. The 18 listed tools (weather, recipe, places, etc.) exist only in the chat‑app; the API side requires users to define their own tools. Likewise, artifact persistence, MCP suggest flow, and Claudeception are UI‑specific conventions.
Key Structural Ideas
Semantic file‑directory separation (draft vs. delivery).
Division of toolset into built‑in and optional (MCP suggest flow).
Hard‑coded copyright compliance (15‑character, single‑quote rule).
Cross‑session state stored in a key‑value store.
Invoking model APIs from within the agent (Claudeception).
Conclusion
The power of Fable 5 does not stem from sheer prompt length (1585 lines vs. a few hundred for GPT) but from the rich, structured operating system it encodes. The prompt’s value lies in its architecture, not its word count.
https://x.com/elder_plinius
https://alphasignalai.substack.com/p/claude-fable-5-prompt-leak-is-a-user
https://github.com/elder-plinius/CL4R1T4S/blob/main/ANTHROPIC/CLAUDE-FABLE-5.mdSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
