apply_chat_payload_breakpoints only marked role "user" messages, but on the OpenAI-shaped envelope (Databricks, OpenRouter, LiteLLM) tool results are role "tool" and tool calls ride on role "assistant", so within a tool-heavy turn both message breakpoints stayed pinned to the last human turn and the growing tail was re-billed at full price on every model call. Anchor the primary breakpoint on the last message whose final content block can carry a marker, regardless of role, and place a trailing anchor ~20 content blocks behind it so the next request's tail marker stays within Anthropic's cache lookback window. Block accounting includes tool_calls entries and retained reasoning_content, which occupy lookback positions as tool_use and thinking blocks. Messages that cannot carry a marker are skipped: empty tool results serialize to content "", assistant tool-call messages to content null, and thinking blocks (type "reasoning" on this envelope) reject cache_control. |
||
|---|---|---|
| .cargo | ||
| .devcontainer | ||
| .github | ||
| .intersect | ||
| bin | ||
| crates | ||
| documentation | ||
| evals/harbor | ||
| examples | ||
| oidc-proxy | ||
| recipe-scanner | ||
| scripts | ||
| services/ask-ai-bot | ||
| ui | ||
| vendor/v8 | ||
| workflow_recipes/release_risk_check | ||
| .dockerignore | ||
| .gitattributes | ||
| .gitignore | ||
| .goosehints | ||
| AGENTS.md | ||
| BUILDING_DOCKER.md | ||
| BUILDING_LINUX.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CLAUDE.md | ||
| clippy.toml | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| CUSTOM_DISTROS.md | ||
| deny.toml | ||
| Dockerfile | ||
| download_cli.ps1 | ||
| download_cli.sh | ||
| flake.lock | ||
| flake.nix | ||
| goose-self-test.yaml | ||
| GOVERNANCE.md | ||
| I18N.md | ||
| Justfile | ||
| LICENSE | ||
| MAINTAINERS.md | ||
| MERGE_FIXES.md | ||
| README.md | ||
| RELEASE.md | ||
| RELEASE_CHECKLIST.md | ||
| rust-toolchain.toml | ||
| SECURITY.md | ||
| test_acp_client.py | ||
goose
your native open source AI agent — desktop app, CLI, and API — for code, workflows, and everything in between
goose is a general-purpose AI agent that runs on your machine. Not just for code — use it for research, writing, automation, data analysis, or anything you need to get done.
A native desktop app for macOS, Linux, and Windows. A full CLI for terminal workflows. An API to embed it anywhere. Built in Rust for performance and portability.
goose works with 15+ providers — Anthropic, OpenAI, Google, Ollama, OpenRouter, Azure, Bedrock, and more. Use API keys or your existing Claude, ChatGPT, or Gemini subscriptions via ACP. Connect to 70+ extensions via the Model Context Protocol open standard.
goose is part of the Agentic AI Foundation (AAIF) at the Linux Foundation.
Get started
Download the desktop app for macOS, Linux, and Windows.
Or install the CLI:
curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | bash
Quick links
- Quickstart
- Installation
- Tutorials
- Documentation
- Governance
- Custom Distributions — build your own goose distro with preconfigured providers, extensions, and branding
Need help?
a little goose humor 🪿
Why did the developer choose goose as their AI agent?
Because it always helps them "migrate" their code to production! 🚀