Verdicts first, ranked by results and evidence.

  • Explainer
    Pydantic AI: Save and reload message history as JSON

    As of November 2026, serialize messages with to_json, reload them with ModelMessagesTypeAdapter.validate_json, and pass the result as message_history on another run. Begin with ModelMessagesTypeAdapter

    6d ago
  • Explainer
    Pydantic AI: Keep the five most recent messages

    As of November 2026, wrap keep_recent_messages in ProcessHistory to send only the last five messages before each model request. Keep tool calls paired with their results when those exchanges matter. Begin with ProcessHistory

    6d ago
  • Explainer
    OpenAI API: Replay history with store=False

    As of November 2026, maintain history yourself, append every response.output item and the next user message, and send the full history with store=False on both calls. Start with from openai import OpenAI

    6d ago
  • Explainer
    OpenAI API: Prewarm the prompt cache

    As of November 2026, prewarm known context without generating output, wait for completion, then send the real question with the same prefix and prewarm omitted or false. Set prompt_cache_options.prewarm

    6d ago
  • Explainer
    OpenAI API: Chain turns with previous_response_id

    As of November 2026, create a response, then pass its id as previous_response_id on the next request to retain earlier context. The follow-up can explain the first answer. Start with from openai import OpenAI

    6d ago
  • Explainer
    Anthropic SDK: Count message tokens before sending

    As of November 2026, estimate input tokens for a Claude message before creating it, using the same model, system prompt and messages. Start with client = anthropic.Anthropic()

    6d ago
  • Explainer
    Roo Code: set the context condensing threshold

    As of November 2026, Set the percentage slider to attempt summarization earlier in long conversations; its default is 100%. Threshold to trigger intelligent context condensing

    6d ago
  • Explainer
    LiteLLM: set keepalive for idle streams

    As of November 2026, configure deployment SSE pings to keep silent streams active through idle connection timeouts. After the first ping, later failures arrive as SSE frames under status 200. Start with keepalive_seconds

    6d ago
  • Explainer
    OpenAI API: set explicit prompt cache breakpoints

    As of November 2026, choose cache boundaries with explicit-only mode and mark reusable input blocks; unmarked requests create no cache writes. Start with prompt_cache_options.mode

    6d ago
  • Explainer
    Ollama: set a 64000-token context length

    As of November 2026, set the serving context to 64000 tokens and inspect allocated context and GPU offloading with ollama ps. Start with OLLAMA_CONTEXT_LENGTH=64000 ollama serve

    6d ago
  • Explainer
    OpenAI Agents SDK: Save chat history in SQLite

    As of November 2026, pass the same file-backed session to successive agent runs to retain conversation history without manually rebuilding input. Start with SQLiteSession

    6d ago
  • Explainer
    Claude Code 2.1.311–312: which session fixes matter?

    As of November 2026, update Claude Code to 2.1.331 (checked 2026-11-24) for the session, compaction, MCP and policy fixes shipped across 2.1.311–2.1.312 (checked 2026-10-28); test long sessions, delayed MCP connections, hooks, nested instructions and VS Code sign-in.

    1mo ago
  • Explainer
    'Not enough messages to compact.' in Claude Code: why?

    As of October 2026, Anthropic’s official troubleshooting page says this message means too few conversation turns to summarize, even if one large paste fills the context; fix: no message-specific recovery is given in that section.

    1mo ago
  • Explainer
    Claude Code: 'Error during compaction: Conversation too long'?

    If Claude Code hits the context limit while /compact is running, the issue was closed by a bot as not planned with no Anthropic reply. Reported workarounds are /compact after pressing Esc twice, /clear, or compacting earlier; the suggested timing numbers are one commenter's estimate.

    1mo ago
  • Explainer
    How do I start a Claude Code subagent that knows our conversation?

    Claude Code's sub-agents docs describe a fork: a subagent that inherits the full conversation, system prompt, tools and model, started with /subtask (v2.1.212 or later; /fork on v2.1.161 to v2.1.211), with its tool calls kept out of your main conversation and only its final result returned.

    1mo ago
  • Explainer
    Why is Claude Code cutting off my command output, and can I raise it?

    As of October 2026, Claude Code's environment variable docs list BASH_MAX_OUTPUT_LENGTH (default 30000 characters, maximum 150000) for how much bash output is read back, and CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS (default 25,000 tokens) for file reads; bigger limits cost context.

    1mo ago
  • Explainer
    How do I keep my agent remembering across sessions: memory plugin, notes, lessons?

    When each Claude Code session repeats corrected mistakes, compare memory plugins or notes, SQLite or Markdown, lesson capture after fixes, correction mining, session resets, and skill trimming; expiring or conflicting memory has no tested answer.

    1mo ago
  • Explainer
    RAG over PDFs: how do I parse, chunk, embed and build an eval set?

    When building question answering over PDFs, compare converters while preserving section hierarchy, benchmark chunk sizes on your documents, evaluate embeddings before re-indexing, check cited evidence and absent answers, and score changes with an eval set. Showing source passages per answer has no tested answer yet.

    1mo ago
  • Explainer
    Claude Code repeats the same wrong fix after corrections: what now?

    As of November 2026, Claude Code’s guide recommends restarting after two failed corrections and putting what you learned into one new prompt. To stop the current action, press Esc; to restart the conversation, use /clear.

    1mo ago
  • Explainer
    How do I make Claude Code keep going until the tests pass?

    As of November 2026, Claude Code's /goal sets a completion condition such as all tests in test/auth pass and lint is clean. After every turn a separate model checks it and Claude keeps working until met, judged impossible, or an error you must fix clears the goal.

    1mo ago
  • Explainer
    Claude Code forgot details after /compact: how do I steer the summary?

    As of October 2026, Claude Code's docs give three controls over compaction: /compact with instructions (for example Focus on the API changes), a Compact instructions section in CLAUDE.md, and Summarize from here in the /rewind menu to condense only part of the conversation.

    1mo ago
  • Explainer
    I joined a codebase I don't know: how do I learn it with an agent?

    As of October 2026, Claude Code's docs suggest starting broad (an overview, architecture patterns, key data models, how auth works), then narrowing, and asking for a glossary of project terms. In an r/ClaudeCode thread commenters add: have it write the architecture notes, but read some code yourself and have the agent poke holes.

    1mo ago
  • Explainer
    Claude Code: how do I see context and usage limits all the time?

    As of October 2026, Claude Code's status line runs a script of yours after each update and passes session JSON on stdin, including context_window.used_percentage and, for Pro, Max and Ultra, rate_limits.five_hour and seven_day. /statusline writes the script for you; popular community configs add git branch and reset timers.

    1mo ago
  • Explainer
    Why does my Cursor weekly usage vanish so fast, and what spends it?

    r/cursor users on the new tiers report limits gone in days: 8 Grok chat messages used about 1.5M tokens (62% cached context) and cloud agents took about 3.3% of a week per hour. Cursor's docs say one weekly pool covers the agent, CLI, Cloud Agents and Grok Bot.

    1mo ago

Missing something? Request a thread. Requests with the most votes become the next ones.

WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp