Add Write tool to sidebar agent and improve error visibility#584
Open
1aifanatic wants to merge 3 commits intogarrytan:mainfrom
Open
Add Write tool to sidebar agent and improve error visibility#5841aifanatic wants to merge 3 commits intogarrytan:mainfrom
1aifanatic wants to merge 3 commits intogarrytan:mainfrom
Conversation
Adds a new bin/gstack-open-url script that opens URLs in the default browser across macOS, Linux, and Windows platforms. - Uses 'open' on macOS - Uses 'xdg-open' on Linux - Uses 'start' on Windows - Supports GSTACK_OPEN_CMD env override for custom handlers This fixes the hardcoded 'open' command that only worked on macOS, enabling the Boil the Lake and Search Before Building intro flows to work on all supported platforms. Closes TODOS.md item: Cross-platform URL open helper
Adds the first-time Search Before Building intro flow, similar to the existing Boil the Lake intro. Changes: - Add generateSearchIntro() function that introduces the Search Before Building principle with a link to the essay - Add SEARCH_INTRO preamble variable that checks for .search-intro-seen - Update generateLakeIntro() to use the new gstack-open-url helper for cross-platform URL opening - Add generateSearchIntro() to tier >= 3 preamble sections This creates a consistent pattern for first-time principle introductions and enables cross-platform browser opening for both intros. Closes TODOS.md item: First-time Search Before Building intro
Fixes two issues with the sidebar agent: 1. Add Write tool support: - Adds 'Write' to --allowedTools list - Users can now create files (CSVs, logs, etc.) via sidebar agent 2. Improve error visibility: - Capture stderr output instead of ignoring it - Include stderr in error messages for spawn errors and timeouts - This helps debug issues when Claude errors or returns empty output Previously, users asking to write files would silently fail, and errors were invisible. Now both issues are surfaced properly. Closes TODOS.md item: Sidebar agent needs Write tool + better error visibility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes two issues with the sidebar agent: (1) missing Write tool prevents file creation, and (2) errors are invisible when Claude fails or returns empty.
Changes
Add Write tool support:
Improve error visibility:
Motivation
Previously, users asking to `write this to a CSV'' would silently fail because Write wasn't in allowedTools. And when the sidebar agent errored, users would just see a green dot forever with no indication of what went wrong.
Testing
Closes TODOS.md item: Sidebar agent needs Write tool + better error visibility