OpenCode 1.17.9 Makes Agent Limits Fail Like a Product, Not a Stack Trace

OpenCode 1.17.9 Makes Agent Limits Fail Like a Product, Not a Stack Trace

OpenCode 1.17.9 is a reminder that agent quality is not only about how many steps the model can take. It is about what happens when the agent must stop, when the provider metadata is weird, when prompt caching is fragile, and when the client is newer than the server. In other words: the boring edges where coding agents become products.

The release was published on June 21 at 00:03:11Z with 37 assets. The compare from v1.17.8 to v1.17.9 reports 23 ahead commits, one behind commit, and 95 files changed. Release reactions were modest — seven total at research time — but that is not the interesting signal. The interesting signal is the shape of the fixes: configured step limits now end in a final text response instead of a mid-run failure, follow-up prompts preserve cacheable user-message shape, Copilot model discovery receives configured headers, GLM-5.2 gets high/max thinking variants, and the TUI hides background-subagent shortcuts when the server does not support them.

Step limits should produce handoffs, not stack traces

PR #33142 is the headline. OpenCode removes a V2-only hard-coded 25-step failure, defaults unconfigured agents to unlimited continuation to match V1, and honors optional agent steps by forcing the configured final turn to text-only. On that final turn, tools are not advertised and tool calls are not executable. The agent gets one last chance to explain where it stopped, what it accomplished, and what remains.

That is the correct product shape. A step limit is not just a loop guard. It is a contract with the user. If the runtime reaches the limit and throws an error, it has protected itself while abandoning the human. If it reaches the limit and produces a concise terminal response, it has converted a control-plane boundary into a useful handoff.

The text-only detail matters. If the final step still exposes tools, the model may try to squeeze in one more edit, one more grep, one more test run. Then the runtime has to reject it, ignore it, or fail after pretending the tool was available. Removing tools from the final turn makes the boundary legible to the model and to the user. Teams building internal agents should copy this pattern. Limits should end in explanation, not ambiguity.

The PR’s test evidence is also worth noting: focused SessionRunner cases covered more than 25 steps, configured final steps, forbidden tool calls, and model switching; the full session-runner.test.ts suite reported 88 passing tests with two existing Location.Ref fixture failures still present on dev. That is a useful level of transparency. Not everything is perfect; the relevant behavior is tested.

Prompt caching is a UX feature wearing a billing hat

PR #33039 removes a steering-only system reminder wrapper around prompts submitted during an active run. Instead, follow-up prompts are sent as normal user messages, and the test asserts the next LLM input preserves the exact user-message shape.

This looks like plumbing until the invoice arrives. Prompt caching is sensitive to message shape. If the runtime wraps a user’s follow-up in fresh system text, it may invalidate cache reuse even when the semantic intent is simple steering. The result is higher latency and higher cost for a bit of runtime narration that probably was not needed.

The broader lesson: agent UX choices have billing consequences. A helpful wrapper, a status reminder, a synthetic instruction, or a regenerated tool catalog can all change cache behavior. If you are operating agents at scale, preserving stable prefixes and exact user-message structure is not micro-optimization. It is cost control.

Provider metadata is now part of the agent surface

OpenCode also ships several compatibility fixes that are easy to underrate. PR #32815 passes configured GitHub Copilot provider headers to model-discovery requests, preserving plugin-owned authorization, user-agent, and API-version headers. Model discovery is not always a neutral list call. If discovery omits headers required by the generation path, the UI can lie: no models available, wrong models available, or different capability metadata than generation will actually use.

PR #32446 exposes high and max thinking variants for GLM-5.2 while keeping the older blanket GLM exclusion for models where reasoning is only a binary toggle. That PR had nine +1 reactions, which is a small but clear signal that users care about model capability fidelity. “Supports GLM” is no longer precise enough. The real question is whether the runtime exposes the right reasoning controls for the right model generation without applying stale rules from older provider families.

PR #32837 is the UI sibling of the same principle. OpenCode exposes enabled experimental server features through GET /experimental/capabilities, discovers background-subagent support during TUI bootstrap, and hides the Ctrl+B command, binding, and footer hint unless support is available. That is how multi-version agent deployments should behave. If the server cannot do the thing, the client should not advertise the thing.

This is especially important as coding-agent clients and servers decouple. A developer may run a new TUI against an older remote server, connect to a hosted environment with experimental flags disabled, or share workflows across machines with different feature gates. Capability discovery is not polish. It is the difference between a trustworthy UI and a command palette full of traps.

The release also includes community-contributed work: OpenCode thanks @Grantmartin2002, @Robin1987China, @kimnamu, and @imranshaiedi-byte. That matters because agent runtimes increasingly function as compatibility layers over many provider quirks. The people who hit those quirks first are often users integrating real models, real terminals, and real repos — not maintainers running happy-path demos.

For practitioners, 1.17.9 is worth validating if OpenCode is part of your coding-agent stack. Configure a low step limit and confirm the final response is explanatory and tool-free. Submit a follow-up message during an active run and inspect whether prompt-cache behavior remains stable. Test Copilot model discovery with custom headers. Run the TUI against a server without background-subagent support and verify the shortcut disappears. If using GLM-5.2, confirm high and max thinking variants appear where expected.

The editorial read: the best coding agents are not the ones that merely run longer. They are the ones that stop cleanly, preserve cacheability, expose accurate provider capabilities, and keep the UI honest about what the server can do. OpenCode 1.17.9 is not flashy. It is runtime maturity. LGTM.

Sources: OpenCode release, GitHub compare, PR #33142, PR #33039, PR #32815, PR #32837, PR #32446