Commit Graph

4561 Commits

Author SHA1 Message Date
Michael Neale fddce4ed25 BRAINROT: update status markers after P1/P2/P3/P4/P6 land
Marks P0/P1/P2/P3/P4/P6 implemented and P5 deferred (with rationale:
pi does not do tool-pair summarization, and goose's emergency-vent
version is more likely to amplify brain rot than reduce it on the
long-context models where it would fire latest).

Signed-off-by: Michael Neale <michael.neale@gmail.com>
2026-05-20 19:11:58 +10:00
Michael Neale fb1119cc02 BRAINROT P2: per-field cap inside code_execution result bundles
The code_execution sandbox encourages the model to bundle multiple
sub-tool calls and return one labeled object like
'Result: { foo, bar, baz }'. Without per-field truncation, a single fat
field (full source file, build log, large query result) bloats the
whole bundle even when the other fields are tiny and useful.

Add truncate_execute_output() which intercepts pctx_code_mode's
ExecuteOutput just before output.markdown() is called and:

  - caps stdout and stderr if they exceed the per-field cap,
  - walks the  JSON value tree and truncates any leaf string
    longer than the cap with a marker.

Truncation is UTF-8 safe and recursive (nested objects + arrays). The
top-level P0 cap (16 KB on the whole tool_result text) still applies as
a backstop; this P2 cap (8 KB per field by default) operates earlier so
that one large field can't drown out the small useful ones in the same
bundle.

- Defaults: 8192 bytes per string field.
- Tunable: GOOSE_CODE_EXEC_FIELD_MAX_BYTES (0 to disable).
- Applied to both handle_execute_typescript and handle_execute_bash
  (execute_bash also wraps a bash invocation whose stdout/stderr can be
  large; same treatment).

Three serial unit tests cover (a) leaf-only truncation across object,
array, and nested object, (b) end-to-end ExecuteOutput cap, (c) env
disable.

Signed-off-by: Michael Neale <michael.neale@gmail.com>
2026-05-20 19:10:57 +10:00
Michael Neale a3d0d02c79 BRAINROT P4: structured compaction template + file tracking + honest continuation
Three coordinated changes to make compacted-state sessions less prone to
confabulation.

(1) Rewrite the compaction summary template (prompts/compaction.md)

Previously the summarizer was told to produce a freeform <analysis> blob.
Replace with an explicit section-based template (Goal / Constraints /
Progress (Done|In Progress|Blocked) / Key Decisions / Critical Context /
Next Step) and trailing <read-files>/<modified-files> blocks. Tells the
model that the summary is its only memory, to prefer concrete facts over
prose, and to not invent facts that aren't in the transcript.

(2) Extract file history from the transcript

New extract_file_history() walks ToolRequest content and pulls 'path'
arguments out of read/write/edit-shaped tool calls (read, write, edit,
file_read, view, text_editor, str_replace_editor, with or without
'<server>__' prefixes; the suffix after the last '__' is also matched).
Results are deduplicated in first-seen order. The lists are threaded
into SummarizeContext as read_files and modified_files and rendered in
the template via {% if read_files %} / {% if modified_files %} blocks.
The summarizer sees these hints and includes them in its
<read-files>/<modified-files> output. Cheap and accurate; if a tool
shape doesn't match, the section just stays empty.

(3) Honest continuation prompts

The three continuation messages (auto compact, tool-loop compact, manual
/compact) previously instructed the model 'Do not mention that you read
a summary or that conversation summarization occurred.' That's a direct
confabulation prompt. Replace with text that tells the model the
previous message is a summary, that the original messages are gone, and
that it should say so plainly and ask rather than guess when something
isn't covered.

Tests:
- 3 new unit tests in context_mgmt covering extract_file_history (reads
  vs writes, dedup, ignoring shell/tree).
- 1 new unit test asserting all three continuation prompts mention
  'summary' and do NOT contain 'Do not mention'.
- compaction.rs integration tests updated: MockCompactionProvider's
  is_compaction heuristic broadened to match 'summary' as well as
  'summarize' (the new template prose uses both); the continuation-text
  detector in the assertion broadened correspondingly. All 3
  integration tests pass.

Signed-off-by: Michael Neale <michael.neale@gmail.com>
2026-05-20 19:08:28 +10:00
Michael Neale ce9edccdb4 BRAINROT P3: append context-hygiene advice to code_execution tool desc
The upstream pctx_code_mode tool descriptions are explicit attractors
toward 'bundle multiple sub-tool calls and return one fat object'. That
intent is fine for round-trip count but creates context bloat when any
bundled field carries a large body (file dumps, build output, edit
echoes).

Add a goose-side 'CONTEXT HYGIENE' addendum appended to each of the
three execute_typescript descriptions (catalog, filesystem, sidecar)
that:

  - tells the model to bundle only when each field is small (~5 KB),
    and to call large-output tools on their own,
  - tells it to return only the fields it actually needs,
  - tells it to use line/limit/head/tail/grep instead of cat <big-file>.

Upstream descriptions are kept verbatim and the goose advice is
appended, so callers reading upstream guidance get the upstream contract
plus the goose context-management override.

The addendum is plain prose with no schema changes; no tool semantics
change. One unit test covers the prefix-preserving combination.

Signed-off-by: Michael Neale <michael.neale@gmail.com>
2026-05-20 19:02:14 +10:00
Michael Neale de5101f216 BRAINROT P6: wire developer.read with default 2000-line cap
Restores the 'read' tool on DeveloperClient. The handler was removed in
f2ad0a852 because ACP clients delegate filesystem I/O and intercept
'read' at the AcpTools layer. Non-ACP sessions were left without a
structured read tool, forcing the model into shell({command:'cat ...'})
which has no line/limit knobs.

Changes:
- 'read' tool registered on DeveloperClient with FileReadParams schema.
- DEFAULT_FILE_READ_LIMIT = 2000 lines applied when caller passes no
  'limit'. When truncation occurs, the result body is followed by:
    [goose: showing lines X-Y of Z (N more lines not shown). Pass
     'line' and/or 'limit' to read a different range.]
- developer_instructions text on both POSIX and Windows updated to tell
  the model to prefer 'read' over 'cat'/'sed' / 'type'/'Get-Content'.
- ACP layer is unchanged: when fs_read is enabled, AcpTools still
  intercepts 'read' and routes to the ACP client; otherwise it falls
  through to the developer impl with the new cap.

Tests updated: previous read tests asserted exact untruncated bodies;
they're replaced with three tests covering (a) small file no marker,
(b) explicit range emits marker, (c) default cap truncates a 5000-line
file at line 2000 with marker.

Signed-off-by: Michael Neale <michael.neale@gmail.com>
2026-05-20 19:00:26 +10:00
Michael Neale ffe8badb15 BRAINROT P1: dedup repeated tool-result text blocks before send
Walks the conversation snapshot just before it's handed to the provider
and replaces any tool_response text block whose (tool_name, arguments,
body) triple is byte-identical to a prior call's result with a short
pointer back to the first occurrence.

- Same file read twice with the same args -> second copy becomes
  '[goose: identical to tool result at turn N (sha=...), N bytes elided,
  tool=read]'.
- Bodies under 512 bytes are skipped (not worth the marker).
- Errors (Err arm) are never deduped.
- Differing args or differing body => pass-through, so genuine changes
  flow normally.
- Session DB and on-screen view keep the full content; only the LLM
  payload is deduped.
- Disable via GOOSE_TOOL_RESULT_DEDUP=0.

6 unit tests covering: dedup fires, args differ -> no dedup, body
changed -> no dedup, small bodies skipped, env disable, and third copy
points to the first occurrence (not the second).

Signed-off-by: Michael Neale <michael.neale@gmail.com>
2026-05-20 19:00:15 +10:00
Michael Neale a1e995c268 BRAINROT: report + P0 universal tool-result text cap
Adds a per-text-block size cap on every tool_result that flows back to
the model, applied at the single MessageContent::tool_response{,_with_metadata}
choke point.

- Default cap: 16 KB per text block.
- Tunable via GOOSE_TOOL_RESULT_MAX_BYTES; set to 0 to disable.
- Truncates at a UTF-8 boundary and appends a marker telling the model
  exactly how to retrieve more (narrower line/limit, grep, head, etc.).
- Non-text content (images, audio, resources) is untouched.
- Tests cover under-cap pass-through, over-cap truncation, env-zero
  disable, and UTF-8 boundary correctness. Env-touching tests are
  serialized via serial_test.

Companion BRAINROT.md explains the assessment, mechanisms, and
followup improvements (P1 dedup, P2 code_execution per-field cap,
P3 prompt softening, P4 structured compaction, P5 better tool-pair
summarization, P6 lean read tool).

Signed-off-by: Michael Neale <michael.neale@gmail.com>
2026-05-20 18:50:36 +10:00
jh-block c467e7f998 Add Linux desktop Vulkan packages (#9323)
Signed-off-by: jh-block <jhugo@block.xyz>
2026-05-20 07:08:42 +00:00
Bradley Axen 7a53017f44 chore: update canonical model registry (#9331)
Signed-off-by: Bradley Axen <baxen@squareup.com>
2026-05-20 06:39:57 +00:00
Lifei Zhou 3631e3cbf1 feat: slash commands (built-in, skill, recipe) in acp server (#9238) 2026-05-20 04:48:34 +00:00
Michael Neale bc6293ce70 feat: add /goal command for agent self-evaluation before finishing (#9069)
Signed-off-by: Michael Neale <michael.neale@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 03:23:58 +00:00
Douwe Osinga 971c690328 Feat/summon subagent instructions (#9325)
Co-authored-by: Douwe Osinga <douwe@squareup.com>
2026-05-19 21:45:14 +00:00
Alex Hancock 20a832afe1 feat: open-plugins generalization + skills (#9112)
Co-authored-by: Jack Amadeo <jackamadeo@block.xyz>
2026-05-19 21:02:34 +00:00
Alex Hancock 904d4d3ea7 feat(hooks): PreToolUse denial (#9304)
Signed-off-by: Alex Hancock <alexhancock@block.xyz>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
2026-05-19 18:13:15 +00:00
Monroe Williams e64617dbcf Add support for optional api_key configuration for declarative openai-engine providers (#9202)
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
2026-05-19 14:08:12 +00:00
Douwe Osinga f41d45ff3a fix(cli): use plain '> ' prompt instead of goose emoji (#9305)
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
2026-05-19 14:06:36 +00:00
Jack Amadeo 7dbdfa43fa flag for login shell PATH (#9313) 2026-05-19 13:57:49 +00:00
Douwe Osinga 259b04d1d4 Remove popular chat topics from new chat screen (#9307)
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
2026-05-19 13:50:12 +00:00
Douwe Osinga 88b5765eac fix: stop killing goosed when a window closes (#9302)
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
2026-05-19 13:28:31 +00:00
jh-block 1997799a4a Remove vendored Windows binaries (#9318)
Signed-off-by: jh-block <jhugo@block.xyz>
2026-05-19 12:25:32 +00:00
jh-block bdb7d214e7 Add Linux musl CLI builds (#9240)
Signed-off-by: jh-block <jhugo@block.xyz>
2026-05-19 07:28:20 +00:00
Kalvin C 49dd575789 feat(acp): paginate session list (#9199)
Signed-off-by: Kalvin Chau <kalvin@block.xyz>
2026-05-19 01:12:57 +00:00
Angie Jones bc9c1fc11a docs: reorganize (#9310) 2026-05-18 18:38:14 +00:00
ayourk badb97a01e Structured per-provider config block, non-destructive provider switching (#8977)
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Signed-off-by: Aaron Yourk <ayourk@gmail.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
2026-05-18 18:22:50 +00:00
Joah Gerstenberg 60c482de25 feat(cli): add goose review local code review command (#9114)
Signed-off-by: Joah Gerstenberg <joahg@squareup.com>
Signed-off-by: Joah Gerstenberg <joah@squareup.com>
Co-authored-by: Joah Gerstenberg <joahg@squareup.com>
Co-authored-by: Amp <amp@ampcode.com>
2026-05-18 15:21:40 +00:00
Alex Hancock 01e2f735d7 feat(tui): diff viewer (#9260)
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
2026-05-18 15:13:12 +00:00
Douwe Osinga 3a2f4ea269 fix(otel): emit trace_output as span attribute instead of event (#9255)
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
2026-05-18 14:47:36 +00:00
James Crosswell ecdf369cbc docs: add guide for connecting goose Desktop to a remote goosed server (#9275)
Signed-off-by: James Crosswell <james.crosswell@gmail.com>
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
2026-05-18 14:42:25 +00:00
Sheikh Limon 92eb1b6d9c fix(config): check file fallback when keyring has no entry (#9279)
Signed-off-by: sheikhlimon <sheikhlimon404@gmail.com>
2026-05-18 14:32:39 +00:00
Steve Officer 49ffcf44fa fix(desktop): ScheduleModal error message styling (#9278)
Signed-off-by: SteveO <steve.officer@gmail.com>
2026-05-18 14:31:32 +00:00
Cole McIntosh 0a4286f052 fix(ui): align sidebar hamburger in macOS fullscreen (#9257)
Signed-off-by: Cole McIntosh <colemcintosh6@gmail.com>
2026-05-18 14:28:47 +00:00
Maksim 809a82ea53 Add documentation for new provider SaladCloud AI Gateway (#9253) 2026-05-18 14:27:03 +00:00
Matt Toohey 688b6d706e fix: use current_exe() instead of PATH lookup when spawning goose (#9236)
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-18 14:20:48 +00:00
Hugues Clouâtre c3b4f78daf fix(extension_manager): set TCP_USER_TIMEOUT on streamable HTTP clients (#9207)
Signed-off-by: Hugues Clouâtre <hugues@linux.com>
2026-05-18 14:15:42 +00:00
Douwe Osinga 7bce91e5eb fix: activate custom provider after adding via configure (#9213)
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
2026-05-18 13:52:33 +00:00
Douwe Osinga 64edb978cd Flush OTLP traces reliably on exit with configurable timeout (#9228)
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
2026-05-18 09:58:05 -04:00
Lifei Zhou cefc685d7f fix: reduce excessive MISSING_TRANSLATION warnings for fallback locales (#9294) 2026-05-18 11:23:55 +00:00
Kalvin C bf54314b67 feat(acp): pass session cwd param to acp providers (#9229)
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Kalvin Chau <kalvin@block.xyz>
2026-05-18 05:47:23 +00:00
Douwe Osinga 06e6e2e850 fix(desktop): eliminate cross-window deep link contamination (#9273)
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Lifei Zhou <lifei@squareup.com>
2026-05-18 03:41:40 +00:00
Douwe Osinga 2eb4685c2c fix: improve Telegram gateway error reporting and connection reliability (#9223)
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
2026-05-18 02:08:06 +00:00
Douwe Osinga 565c0e5773 fix(cli): enable VT processing on Windows Console Host (#9248)
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
2026-05-18 01:30:38 +00:00
Michael Neale 027137ce59 feat(chatgpt_codex): add gpt-5.5 to known models (#9292)
Signed-off-by: Michael Neale <michael.neale@gmail.com>
2026-05-18 01:17:12 +00:00
Angie Jones 7cfc4410a8 docs: hooks guide (#9288) 2026-05-17 23:53:44 +00:00
Douwe Osinga daf11f5b96 fix: zero out cost for local providers (ollama, local) (#9219)
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
2026-05-17 23:47:51 +00:00
Lifei Zhou 1fafd74413 mount acp in the goosed server to migrate using acp protocols iteratively (#9097) 2026-05-17 23:43:30 +00:00
Douwe Osinga d04c882388 Remove Filesystem MCP extension from catalog (#9225)
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
2026-05-16 18:30:59 +00:00
Alex Hancock ca9f98d1cd feat: opt-in to vercel ai gateway leaderboard (#9259) 2026-05-16 18:29:40 +00:00
Douwe Osinga 3254d442c9 docs: document summon extension requirement for delegate and load tools (#9231)
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
2026-05-16 14:41:15 +00:00
dependabot[bot] 3cf0bcdec7 chore(deps): bump actions/configure-pages from 5.0.0 to 6.0.0 (#9262)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-15 14:05:56 -04:00
dependabot[bot] a8d4e0513e chore(deps): bump actions/attest-build-provenance from 3.0.0 to 4.1.0 (#9263)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-15 14:05:52 -04:00