Artifact database writes can now edit a field in place, check document versions, and simulate lower access levels
What
- The artifact database's write tool gained a
str_replaceoperation for editing a string field in place by exact old-text/new-text match, instead of resending the whole document. It supportsreplace_allto replace every match, and reports clear errors when the match can't be made:edit_no_match,edit_ambiguous,edit_field_missing,edit_field_not_string. - Writes can now use optimistic concurrency: passing
if_version(ifVersion) rejects the write with aversion_mismatcherror if the document changed since it was last read, and write results can report the document's new version number. - A new
as_levelparameter onread_db/write_dblets the caller simulate reading or writing as a lower access level (interactoradmin), to check what a less-privileged user would be allowed to do, without actually lowering the caller's own access. str_replaceis threaded through both the single-write and batch (write_db/batch) code paths, and is currently gated off by default behind a feature flag (requiring both the artifact database and a dedicated str-replace flag to be enabled).
Why
These changes let Claude make small, precise edits to artifact database records instead of rewriting entire documents, avoid clobbering concurrent changes via version checks, and preview permission outcomes for other access levels before acting.
tengu_umber_stile Not enough to sayNothing here resolved what this flag was doing on this version, so nothing here should be read as on or off.
This account: no value returned · anonymous baseline: no value returned · compiled default in v2.1.265: off
tengu_umber_lattice Not enough to sayNothing here resolved what this flag was doing on this version, so nothing here should be read as on or off.
This account: no value returned · anonymous baseline: on · compiled default in v2.1.265: off
Read once, for one account on one subscription tier, against v2.1.265. It isn't a statement about your account. What a flag value here can and cannot tell you
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.
case "str_replace":agents-and-tools/tool-use/text-editor-tool see the edit
Anthropic's documentation has since written up str_replace, on text-editor-tool.
New in this build: tengu_umber_stile