Goose
May 10, 2026 ยท View on GitHub
Block's Goose CLI.
- Source:
src/providers/goose.ts - Loading: lazy (
src/providers/index.ts:29-42) - Test: none. Adding a fixture-based test is a known good first issue.
Where it reads from
A SQLite database. Path resolution honors XDG_DATA_HOME and a GOOSE_PATH_ROOT override:
| Platform | Default path |
|---|---|
| macOS / Linux | ~/.local/share/goose/sessions/sessions.db |
| Windows | %APPDATA%/Block/goose/sessions/sessions.db |
See goose.ts:52-62.
Storage format
SQLite.
Caching
None.
Deduplication
Per sessionId (goose.ts:174).
Quirks
- Source paths are encoded as
<dbPath>:<sessionId>so a single db can yield many session sources. The discovery code splits on the last colon (goose.ts:148-150). - Tool inventory comes from the
messagestable queried withLIKE '%toolRequest%'(goose.ts:90). This will miss tools whose payloads are encoded differently in a future Goose version. - Tokens are read directly from
accumulated_input_tokensandaccumulated_output_tokens. No estimation.
When fixing a bug here
- Add a fixture-based test before changing logic.
tests/providers/goose.test.tsdoes not exist yet; create it and use a small SQLite file undertests/fixtures/goose/. - If the bug is "no sessions", check
XDG_DATA_HOMEandGOOSE_PATH_ROOTfirst; users on non-default Linux setups will not match the default path. - The
LIKE '%toolRequest%'query is fragile. If Goose changes the message envelope, this is where it will break.