Twitter/X

Anthropic deprecated forced prefilling of assistant messages in the Opus 4.6…

Brief

Anthropic’s Opus 4.6 release removed support for forced assistant-message prefilling, a technique Rahul Gs says Ramp relied on to enforce correct JSON output. Their system retried malformed responses by seeding the model with a valid JSON prefix and letting it complete the object, making an older grammar-correction workaround from Rahul and @que_tourist obsolete.

Why it matters

Anthropic deprecated forced prefilling of assistant messages in the Opus 4.6 release, according to @rahulgs on 2026-02-06.

Key details

  • Rahul Gs says Ramp had used forced prefilling to guarantee valid JSON by retrying generations with a corrected JSON prefix whenever the model diverged from the required structure.
  • The workaround involved grammar-correction code written about 3 years earlier by @rahulgs and @que_tourist, which he says can now be deleted.
Source evidence

title: @rahulgs: anthropic deprecated forced prefilling of assistant messages in the opus 4.6 release

we used this a...
author: @rahulgs
contenttype: tweet
publication: Twitter/X
published: 2026-02-06T00:55:07+00:00
source
url: https://x.com/rahulgs/status/2019575548452733299

word_count: 79

anthropic deprecated forced prefilling of assistant messages in the opus 4.6 release

we used this at ramp to guarantee correct json -

whenever the model diverged from correct json structure, we would reattempt with a correct json prefix and let the model fill in the rest of the json object starting from the corrected prefix

can finally delete this grammar-correction code that @que_tourist and I wrote 3 years ago

(also gennady also happens to be the goat competitive programmer)