cli(config): Add GOOSE_CONTEXT_STRATEGY setting (#2666)

Co-authored-by: Michael Neale <michael.neale@gmail.com>
This commit is contained in:
Raduan Al-Shedivat
2025-06-03 19:32:44 +02:00
committed by GitHub
parent 601744518d
commit 78234fb103
3 changed files with 120 additions and 49 deletions

View File

@@ -62,6 +62,24 @@ export GOOSE_PLANNER_PROVIDER="openai"
export GOOSE_PLANNER_MODEL="gpt-4"
```
## Session Management
These variables control how Goose manages conversation sessions and context.
| Variable | Purpose | Values | Default |
|----------|---------|---------|---------|
| `GOOSE_CONTEXT_STRATEGY` | Controls how Goose handles context limit exceeded situations | "summarize", "truncate", "clear", "prompt" | "prompt" (interactive), "summarize" (headless) |
**Examples**
```bash
# Automatically summarize when context limit is reached
export GOOSE_CONTEXT_STRATEGY=summarize
# Always prompt user to choose (default for interactive mode)
export GOOSE_CONTEXT_STRATEGY=prompt
```
## Tool Configuration
These variables control how Goose handles [tool permissions](/docs/guides/tool-permissions) and their execution.