Plugins and hooks can fill the prompt input box in replace, append, or insert mode, with new APIs to read and stamp these actions
What
The internal system plugins and hooks use to put text into your input box (the "draft") has been extended.
- The
fillDraftAPI, used by plugins and hooks to populate the input box, now takes a mode:replace(the old default, replaces everything),append(adds text to the end of what's already there), orinsert(inserts text at your cursor position). - A companion
readDraftAPI (also exposed as the hook method$.prompt.read) lets a plugin read the current input box text and cursor position before deciding what to do. - Slash-command-triggered plugin actions of type
prompt.fill(defaulting toreplacemode) andprompt.suggestnow get the same default plugin-origin metadata thatcommand.runactions already had. - A new settings layer called
memorywas added alongside the existing managed/user/project/local layers, and the replace/append/insert modes are validated against an explicit list, with an error shown for invalid modes.
Why
This gives plugins finer control over how they interact with whatever you're already typing, instead of always overwriting it. A plugin can now add a suggestion after your text or insert something right where your cursor is, and it can check what's already in the box first.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Anthropic measured the triage job from [Trim input and context tokens](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#trim-input-and-context-tokens) with pauses inserted before some turns to si…about-claude/models/optimizing-for-cost-and-intelligence see the edit
* `synthetic_marker` marks records generated by the endpoint itself, such as the marker that stands in for the system prompt. When the client rewrites or compacts its conversation history mid-session (for example, after context compaction)…manage-claude/compliance-sessions see the edit
* **A `CLAUDE.md` that tells Claude in words to read `AGENTS.md`**: Claude sees `AGENTS.md` only if it decides to open the file. Delete the `CLAUDE.md` so Claude reads `AGENTS.md` directly, or replace the sentence with an `@AGENTS.md` impo…memory see the edit
You can also run [`/import`](/docs/en/commands) to bring a supported coding agent's configuration into Claude Code, which appends a one-time copy of instruction files such as `AGENTS.md` to the matching `CLAUDE.md` and carries over MCP ser…memory see the edit
* A session you start yourself in a terminal, which runs however you invoked it. To cover these sessions, put a script named `claude` in a directory earlier on `PATH` that runs your launcher with the real binary; don't replace the managed …corporate-launcher see the edit
* **Before you type anything**: CLAUDE.md, auto memory, MCP tool names, and skill descriptions all load into context. [AGENTS.md files](/docs/en/memory#agents-md) can load too, on their own or alongside CLAUDE.md. Your own setup may add mo…context-window see the edit
How the new `memory` layer and the replace/append/insert edit modes are actually exposed or used isn't stated.
A small documentation edit on Explore the context window touched a line naming append after this was published.