Long AI Conversations Hit Limits: Backup, Compute, and API Migration Guide

    Community reports suggest some mobile users are encountering long-conversation limits, including a 72-hour cutoff message, while the platform has not published an official explanation. This article separates confirmed facts from unverified claims, explains why long contexts consume prefill and KV-cache compute, shows how to export and validate conversation backups, provides a minimal self-hosted Python/SQLite chat workbench, and offers a decision table for staying on the platform or migrating to the API.

    I. First, Verify: What Is Fact and What Is Not Yet Certain

    According to community reports, some users in the mobile app see a message when continuing a long conversation from several days earlier: “Due to insufficient compute, long conversations exceeding 72 hours are temporarily unavailable; you can export the conversation to another app.” Community reports also include errors such as “content too long, please shorten and try again” and “message count limit reached.” These reports are concentrated on mobile, and the platform has not issued an official statement.

    The following information is unverified and should be treated with caution:

    • Some users say a single conversation triggers the limit at about 148,000 characters. Different users count in different ways, so this number cannot be used as a basis for judgment.
    • A developer found quota management logic in the web front-end code, with the text “usage quota reached, please try again after your quota is restored.” This shows that quota-related logic exists in the code, but it does not mean the feature is about to launch, and it certainly does not mean it will be charged.
    • Some rumors say the feature will soon be paid. There is currently no official basis for this.

    During the same period, the platform also released a set of APIs opening web search, deep-thinking search, file input, link reading, and voice capabilities, and open-sourced a chat front-end example. The platform is limiting long conversations while exposing capabilities to external developers. This combination may be the result of resource scheduling, or it may reflect a product-direction adjustment. Both explanations are speculation; rely on official announcements and documentation before drawing conclusions.

    II. Why Long Conversations Consume Large Amounts of Compute

    Before generating a reply, a large language model must read the full context. This process has two stages, and their cost sources differ.

    2.1 Prefill and Token-by-Token Generation

    In the prefill stage, the model processes the entire input at once. For standard full attention, computation scales with the square of sequence length, so the longer the input, the faster compute grows in this stage. Time to first token (TTFT) is mainly determined by this stage.

    In the decode stage, each new token requires the model to read the full historical KV cache. The memory used by the KV cache can be estimated with the following approximate formula:

    KV cache bytes ≈ 2 × layers × KV heads × head dimension × sequence length × bytes per element × concurrent requests

    Consider a hypothetical example: 32 layers, 8 KV heads, head dimension 128, sequence length 100,000, 2 bytes per element (FP16 or BF16), and 1 concurrent request. Substituting into the formula gives 2 × 32 × 8 × 128 × 100,000 × 2 ≈ 13.1 GB (about 12.2 GiB). These parameters are set to illustrate the calculation method and do not represent the real configuration of any platform.

    The formula shows that both sequence length and concurrent requests scale memory usage linearly. A long conversation means a single request occupies a larger cache, so the same server can serve fewer requests at the same time.

    2.2 Other Factors Affecting Cost

    Actual cost is also affected by the following factors and cannot be explained by “quadratic growth” alone:

    • Model architecture: designs such as grouped-query attention (GQA) reduce the number of KV heads and therefore reduce cache size.
    • Quantization: converting the KV cache to lower precision can reduce memory, but it may affect output quality and requires testing.
    • Batching: the serving side combines multiple requests for computation. Long requests occupy more memory and reduce throughput for other requests.
    • Cache reuse: if the platform supports prefix caching, repeated historical prefixes can reuse previous computation results. Whether this is supported and how it is billed depends on the platform implementation.
    • Measurement scope: TTFT is mainly affected by prefill, while the generation speed of each subsequent token is mainly affected by KV-cache reads. When comparing two approaches, specify which metric is being measured.

    Sparse attention and linear attention can reduce some overhead, but ultra-long contexts in production still increase memory, latency, and per-request cost. This is a reasonable reason for a platform to limit long conversations.

    2.3 Trimming Strategies for Long Conversations

    If you handle long conversations yourself, there are three common trimming approaches:

    Strategy Approach Suitable Scenario Main Risk
    Sliding window Keep only the most recent N turns Casual chat, or when each turn is relatively independent Early constraints and background are lost
    Summary compression Periodically ask the model to summarize old content and replace the original text with the summary Project discussions lasting several weeks Summaries may omit or distort information; keep the original text backed up
    Retrieval augmentation Split history into chunks, store them in a vector database, and recall relevant fragments based on the current question Document Q&A that needs to cite old details Recall may be inaccurate, and additional indexing and maintenance are required

    III. How Ordinary Users Can Export and Back Up Conversations

    Back up conversations before the platform restricts long conversations. The backup steps are as follows:

    1. Find the export entry. Look for “Export,” “Data export,” or “Backup” in the app’s settings, account, or conversation menu. The location may differ by version; refer to the official help documentation. If you cannot find the entry, do not guess at other paths—check the platform documentation directly.
    2. Choose a format. JSON files preserve structural information such as roles and timestamps and are suitable for programmatic reading. Markdown files are suitable for direct reading and searching. If both formats can be saved, keep one copy of each.
    3. Verify completeness. Note the number of message turns in the app and compare it with the number of messages in the exported file. Check whether the last message and attachments are present, and randomly spot-check middle sections against the original text.
    4. Protect privacy. Exported files contain personal information and potentially sensitive content. Store them on an encrypted disk or in a controlled directory, and do not upload them to unknown websites. Remove unnecessary content before sharing.
    5. Keep multiple copies. If export fails, take screenshots of key content and report the issue to the platform. Do not rely on a single backup.

    IV. Building Your Own Conversation Workbench

    If you want to keep long conversations in an environment you control, prepare according to the checklist below.

    4.1 Environment and Dependency Checklist

    • Runtime: Python 3.10 or later.
    • Dependencies: pin versions in requirements.txt, for example requests==2.32.3, to avoid behavior changes after dependency upgrades.
    • Environment variables: CHAT_API_BASE (API address), CHAT_API_KEY (key), CHAT_MODEL (model name), CHAT_DAILY_TOKEN_BUDGET (optional daily usage budget). Get the API address and model name from the official documentation.
    • API path: /chat/completions in the code is only a common pattern; the actual path and response fields follow the official documentation.
    • Keys: pass keys only through environment variables, never write them into code, configuration files, or version control. Do not print keys to logs or terminal output. Use least-privilege keys and rotate them regularly. If you find unfamiliar usage records, immediately revoke the old key in the platform console and replace it.
    • Rate limits and quotas: record the requests per minute and usage limits in the official documentation. When the API returns usage fields, the code accumulates usage locally and stops calling after the daily budget is exceeded.
    • Retries: only retry temporary errors such as 429, 500, 502, and 503 with exponential backoff. Retrying parameter errors such as 400 is meaningless and should raise an error directly.
    • Storage: use SQLite to save messages. The database file and backups also contain personal information, so set file permissions so that only the current user can read and write them.

    4.2 Minimal Runnable Code

    The following code handles the API path, response parsing, usage accounting, and retries. Save it as chat.py.

    1. import os
    2. import sqlite3
    3. import sys
    4. import time
    5. import requests
    6. API_BASE = os.environ.get("CHAT_API_BASE", "")
    7. API_KEY = os.environ.get("CHAT_API_KEY", "")
    8. MODEL = os.environ.get("CHAT_MODEL", "")
    9. DAILY_TOKEN_BUDGET = int(os.environ.get("CHAT_DAILY_TOKEN_BUDGET", "200000"))
    10. MAX_CONTEXT_CHARS = 60000 # Local character budget. Characters are not tokens; convert according to the model window.
    11. MAX_RETRIES = 3
    12. RETRYABLE = {429, 500, 502, 503}
    13. DB_PATH = "conversations.db"
    14. SYSTEM_PROMPT = "You are a helpful assistant."
    15. def require_env():
    16. missing = [k for k in ("CHAT_API_BASE", "CHAT_API_KEY", "CHAT_MODEL") if not os.environ.get(k)]
    17. if missing:
    18. sys.exit(f"Missing environment variables: {', '.join(missing)}")
    19. def init_db():
    20. conn = sqlite3.connect(DB_PATH)
    21. conn.execute(
    22. """CREATE TABLE IF NOT EXISTS messages (
    23. id INTEGER PRIMARY KEY AUTOINCREMENT,
    24. conv_id TEXT NOT NULL,
    25. role TEXT NOT NULL,
    26. content TEXT NOT NULL,
    27. created_at REAL NOT NULL)"""
    28. )
    29. conn.execute(
    30. "CREATE TABLE IF NOT EXISTS usage (day TEXT PRIMARY KEY, tokens INTEGER NOT NULL)"
    31. )
    32. conn.commit()
    33. if os.path.exists(DB_PATH):
    34. os.chmod(DB_PATH, 0o600) # Readable and writable only by the current user
    35. return conn
    36. def save(conn, conv_id, role, content):
    37. conn.execute(
    38. "INSERT INTO messages (conv_id, role, content, created_at) VALUES (?, ?, ?, ?)",
    39. (conv_id, role, content, time.time()),
    40. )
    41. conn.commit()
    42. def load(conn, conv_id):
    43. rows = conn.execute(
    44. "SELECT role, content FROM messages WHERE conv_id = ? ORDER BY id", (conv_id,)
    45. ).fetchall()
    46. return [{"role": r, "content": c} for r, c in rows]
    47. def today_tokens(conn):
    48. day = time.strftime("%Y-%m-%d")
    49. row = conn.execute("SELECT tokens FROM usage WHERE day = ?", (day,)).fetchone()
    50. return row[0] if row else 0
    51. def add_tokens(conn, n):
    52. day = time.strftime("%Y-%m-%d")
    53. conn.execute(
    54. "INSERT INTO usage (day, tokens) VALUES (?, ?) "
    55. "ON CONFLICT(day) DO UPDATE SET tokens = tokens + excluded.tokens",
    56. (day, n),
    57. )
    58. conn.commit()
    59. def build_context(history):
    60. """history contains only user and assistant messages. The system message is added at the front here.
    61. Messages are taken from newest to oldest; earlier messages beyond the character budget are dropped."""
    62. budget = MAX_CONTEXT_CHARS - len(SYSTEM_PROMPT)
    63. kept, total = [], 0
    64. for m in reversed(history):
    65. total += len(m["content"])
    66. if total > budget:
    67. break
    68. kept.append(m)
    69. if history and not kept:
    70. raise ValueError("The latest message exceeds the local character limit. Shorten it and send again.")
    71. return [{"role": "system", "content": SYSTEM_PROMPT}] + list(reversed(kept))
    72. def parse_reply(data):
    73. """Extract reply text and usage according to the response format. Field names follow the platform documentation; raise a clear error if missing."""
    74. try:
    75. text = data["choices"][0]["message"]["content"]
    76. except (KeyError, IndexError, TypeError):
    77. raise RuntimeError("Response format does not match expectations. Adjust the parsing code according to the official documentation.")
    78. tokens = (data.get("usage") or {}).get("total_tokens", 0)
    79. return text, tokens
    80. def call_api(messages):
    81. url = f"{API_BASE.rstrip('/')}/chat/completions" # Path is only an example; follow the official documentation
    82. headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
    83. payload = {"model": MODEL, "messages": messages}
    84. for attempt in range(MAX_RETRIES):
    85. try:
    86. resp = requests.post(url, headers=headers, json=payload, timeout=60)
    87. except requests.RequestException:
    88. if attempt == MAX_RETRIES - 1:
    89. raise
    90. time.sleep(2 ** attempt)
    91. continue
    92. if resp.status_code in RETRYABLE and attempt < MAX_RETRIES - 1:
    93. time.sleep(2 ** attempt)
    94. continue
    95. resp.raise_for_status()
    96. return parse_reply(resp.json())
    97. def main():
    98. require_env()
    99. conn = init_db()
    100. conv_id = "default"
    101. history = load(conn, conv_id)
    102. print("Enter a blank line to exit.")
    103. while True:
    104. text = input("You: ").strip()
    105. if not text:
    106. break
    107. if today_tokens(conn) >= DAILY_TOKEN_BUDGET:
    108. print("Today's usage has reached the local budget. Calls have been stopped.")
    109. break
    110. history.append({"role": "user", "content": text})
    111. try:
    112. reply, tokens = call_api(build_context(history))
    113. except (requests.RequestException, RuntimeError, ValueError) as e:
    114. history.pop() # Do not save failed input; allow editing and resending
    115. print(f"Call failed: {e}")
    116. continue
    117. save(conn, conv_id, "user", text)
    118. save(conn, conv_id, "assistant", reply)
    119. add_tokens(conn, tokens)
    120. history.append({"role": "assistant", "content": reply})
    121. print(f"Assistant: {reply}")
    122. conn.close()
    123. if __name__ == "__main__":
    124. main()

    Run steps:

    1. python -m venv .venv
    2. source .venv/bin/activate # On Windows use .venv\Scripts\activate
    3. pip install -r requirements.txt
    4. export CHAT_API_BASE="the address given in the platform documentation"
    5. read -s CHAT_API_KEY && export CHAT_API_KEY # Do not write the key to shell history
    6. export CHAT_MODEL="the model name given in the platform documentation"
    7. python chat.py

    You can back up the database with SQLite’s built-in command to create a dated copy:

    1. sqlite3 conversations.db ".backup backup_$(date +%F).db"

    The code assumes the response format is the same as common chat APIs. If the platform returns a different structure, only parse_reply and the API path need to be modified.

    V. When to Keep Using the Platform and When to Migrate to the API

    The two approaches suit different scenarios. The decision table below can help.

    Dimension Keep Using the Platform Migrate to the API
    Conversation length Single conversations are short, with occasional longer ones Frequently exceeds platform limits and requires longer context
    Privacy and compliance It is acceptable for conversation data to be stored by the platform Data must stay in your own environment, or compliance requirements must be met
    Cost Subscription or free quota is sufficient Usage is stable and predictable, pay-as-you-go is more cost-effective, and actual calculation is required
    Latency Existing latency is acceptable You need custom timeouts, streaming output, or local caching strategies
    Maintenance You do not want to maintain code and keys You can accept maintaining keys, dependencies, and backups
    Feature stability Platform features are stable and the team is familiar with them You need a fallback outside the platform

    The default recommendation is to keep using the platform and regularly export important conversations. Consider migration when: long-conversation limits are triggered frequently for several consecutive weeks, conversations need to be integrated into automated workflows, or there are explicit requirements about data location.

    Before migrating, use the same set of about 20 real questions to test both the platform and the API, recording TTFT, per-request cost, and answer quality. If quality drops significantly, keep the platform as the primary channel.

    Stop immediately in the following situations:

    • Daily usage approaches the budget or shows unusually high usage. Stop calls immediately and check whether the code is stuck in a loop.
    • You find unfamiliar usage records or suspect that a key may have leaked. Revoke the key and replace it immediately.
    • Quality drops significantly after migration. Roll back to the platform and record the failing test cases.
    • Before sending sensitive data to a third-party API, read its data usage terms.

    Conclusion

    There is still no official explanation for why long conversations are limited. Regardless of how the platform eventually handles this, do two things first: export and verify important conversations, then decide whether to keep using the platform or migrate to the API based on your conversation length, privacy requirements, and maintenance capacity.