When an agent gets a conversation, preserving the words is not enough. It has to preserve the speakers. A public CrewAI pull request, openly marked “Generated with Claude Code,” traces a bug in Agent.kickoff that joined a multi-message conversation into one user string. The provider could then see an agent’s previous reply as if the user had said it—a subtle corruption of the instruction boundary rather than a cosmetic formatting flaw.
The fix protects the sequence, not just the text
The inspected repository commit separates prior history, the current request, and turns that follow the request. Both the current and deprecated executors place history after any system prompt and before the current user message; trailing assistant or tool turns stay after the request they answer. The work also keeps an assistant tool-call message with its tool result, preserves attachments without re-sending earlier files, and lets declarative actions accept a list of messages rather than rejecting it as non-string input.
That breadth is what makes the patch useful Builder Work. The new behavior tests use a recording LLM rather than only comparing strings. They check role order, a conversation that ends with a tool result, a trailing agent scratch note, prompt-disabled execution, the deprecated executor, and the async path. The PR also describes review findings from Cursor Bugbot and CodeRabbit. Those public receipts show an engineering loop that tested the protocol’s awkward edges instead of stopping once the first happy-path transcript looked right.
Transferable skill: write the invariant before you write the patch
For builders, the reusable move is to name the invariant in the representation the provider sees: every preserved message keeps its role; a tool result follows its tool call; the active request remains the active request; prior attachments do not become new ones. Then exercise every adapter that serializes or reorders that representation. This is especially important when a coding agent helps implement the change: generated code can make a local symptom disappear while leaving a second executor, compatibility branch, or asynchronous entry point with the original structural bug.
The limit is explicit. The pull request was open when inspected, so the source does not establish a merge, a release, or behavior in any deployed CrewAI workflow. Nor does public Claude Code provenance make the repair independently correct. The next signal worth watching is whether the same role-and-order invariant is retained through merge, release notes, and provider-specific integration tests—not whether the patch merely retains all the same words.