You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up from agent-framework PR #58 review (2026-07-13).
The Anthropic API rejects empty text blocks with 400 "text content blocks must be non-empty", and every consumer that assembles a request from stored history can produce them (tool-only turns, delivery-failure placeholders, silent/skip turns). There are now three downstream copies of the same defense:
context-manager's stripEmptyTextBlocks on the compression path (85f8da1, 0.5.9),
agent-framework's live-path sanitize in buildActivationRequest (PR #58),
Membrane already owns the wire-boundary repair pass for exactly this bug class — orphan tool_use repair (normalizeToolPairs), same-role envelope merging (mergeConsecutiveRoles), the adapter-level block sanitize in buildRequest. Empty-text stripping belongs in that pass: strip empty/whitespace/non-string text blocks, drop messages left with zero content, cover every consumer and every path at once instead of one path per incident per repo.
Field context: one empty block in a compiled window mutes an agent completely — [inference-failed] on every activation until the message ages out (2026-07-10, resident agent).
Downstream copies can then become no-ops to be deleted at leisure; they are all idempotent with a membrane-level strip.
Follow-up from agent-framework PR #58 review (2026-07-13).
The Anthropic API rejects empty text blocks with 400 "text content blocks must be non-empty", and every consumer that assembles a request from stored history can produce them (tool-only turns, delivery-failure placeholders, silent/skip turns). There are now three downstream copies of the same defense:
stripEmptyTextBlockson the compression path (85f8da1, 0.5.9),buildActivationRequest(PR #58),runInferenceWithInjectionsstill needs one (runInferenceWithInjections misses the empty-text sanitize (buildActivationRequest docstring is no longer true) anima-research/agent-framework#62).Membrane already owns the wire-boundary repair pass for exactly this bug class — orphan tool_use repair (
normalizeToolPairs), same-role envelope merging (mergeConsecutiveRoles), the adapter-level block sanitize inbuildRequest. Empty-text stripping belongs in that pass: strip empty/whitespace/non-string text blocks, drop messages left with zero content, cover every consumer and every path at once instead of one path per incident per repo.Field context: one empty block in a compiled window mutes an agent completely — [inference-failed] on every activation until the message ages out (2026-07-10, resident agent).
Downstream copies can then become no-ops to be deleted at leisure; they are all idempotent with a membrane-level strip.
🤖 Generated with Claude Code