Record the last routed request's header (system prompt, tools) per session in a bounded in-process registry, then build the summarization request as that request plus the compaction instruction as the final user message, with the prompt cache enabled and the session's thinking config inherited. This replaces the standalone summarizer shape for session compaction; a session with no recorded header summarizes the same way with an empty header. The unused compaction.md template leaves the template registry and docs; a stale user override warns toward compaction_prefix.md and compaction_summary.md. When the summarizer overflows, tool-response contents are elided middle-out in progressively larger fractions, keeping every tool request/response pair intact. A response that is not a summary (a tool call, or no text) gets one corrective retry on the same cached prefix, with rejected tool calls paired to stub results and a re-instruction; a second rejection fails compaction with an error that carries the billed usage of each rejected attempt, which every loop records per attempt so cost is kept and the context gauge is not inflated. Toolshim sessions convert tool traffic to text at send time (so elision still sees native tool responses) and interpret the summarizer's response like any session response, so a textual shim-protocol tool call is rejected and corrected instead of accepted as the summary. |
||
|---|---|---|
| .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! 🚀