Agent Frameworks & Harnesses 2026-09-27

Framework Watch: LangChain.js Agents Now Retry Failed returnDirect Tools, and OpenAI Gets Explicit Prompt Caching

langchain 1.5.14 and @langchain/openai 1.6.0 shipped on September 27. One fixes an agent loop that ended on the first tool error; the other exposes prompt-cache breakpoints.

LangChain.js published a batch of releases on September 27, 2026. Two matter for anyone running agents in production.

langchain@1.5.14 changes how createAgent handles tools marked returnDirect. Previously, a run ended as soon as such a tool was called, even if the call failed. Now, per the release notes (PR #11712), "createAgent no longer ends the run when a returnDirect tool fails." A tool error, "including arguments that fail the tool's schema, now goes back to the model so it can correct the call and retry". The run still ends on the first successful returnDirect result. Error ToolMessages from the tool node now carry status: "error", and a custom handleToolErrors result defaults to that status. The old behaviour meant a single malformed argument could end a run with an error as its final answer, which is exactly the kind of brittleness that separates demos from production.

@langchain/openai@1.6.0 adds "explicit prompt cache options and content-block breakpoints" (PR #11232), so callers can mark where a cacheable prefix ends instead of relying on automatic prefix matching. A patch in the same release (PR #11735) fixes promptCacheRetention: "in-memory", which is now sent as "in_memory" because the API rejects the hyphenated value. Option precedence is now defined as per-call option, then modelKwargs, then the constructor field, and modelKwargs values are no longer dropped on Chat Completions.

Both changes point the same way: agent frameworks are moving from "make it work" to "make it cheap and robust". Prompt caching is one of the largest cost levers for agents that resend long system prompts and tool definitions every turn. Retry-on-error for terminal tools removes a failure mode that only shows up under real traffic. The same batch also bumped @langchain/xai, @langchain/openrouter and @langchain/mongodb.

Upgrade LangChain.js agents to 1.5.14 so returnDirect tool failures are retried instead of ending the run, and use @langchain/openai 1.6.0's explicit cache breakpoints to cut repeated-prefix cost.