Adds a hook for when goose is working vs waiting for input#6702
Closed
trobrock wants to merge 2 commits intoblock:mainfrom
Closed
Adds a hook for when goose is working vs waiting for input#6702trobrock wants to merge 2 commits intoblock:mainfrom
trobrock wants to merge 2 commits intoblock:mainfrom
Conversation
0f5866b to
21fc2b2
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a status hook feature that allows users to run shell commands when goose's status changes between "waiting" (ready for input) and "thinking" (processing). This is particularly useful for users running multiple goose sessions in tmux tabs who want visual indicators of which sessions are ready for input.
Changes:
- Added
GOOSE_STATUS_HOOKenvironment variable for configuring status change hooks - Implemented
run_status_hook()function to execute hook commands asynchronously - Added status hook calls at key points in the interactive session loop
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| documentation/docs/guides/environment-variables.md | Documents the new GOOSE_STATUS_HOOK environment variable with examples for tmux window title updates |
| crates/goose-cli/src/session/output.rs | Implements run_status_hook() function and adds basic tests for the hook functionality |
| crates/goose-cli/src/session/mod.rs | Adds hook calls to signal "waiting" before input and "thinking" when processing starts |
Whitewolf111
approved these changes
Jan 25, 2026
9ce5bfd to
c8fac50
Compare
Adds a hook that runs when goose's status changes between 'waiting' (ready for input) and 'thinking' (processing). This is useful for users running multiple goose sessions who want visual indicators of which sessions are ready for input. Example usage for tmux title: export GOOSE_STATUS_HOOK='printf "\033]2;goose: $1\033\\"' Features: - Cross-platform support (sh -c on Unix, cmd /C on Windows) - Runs asynchronously to not block the main thread - Errors are silently ignored Signed-off-by: Trae Robrock <trobrock@gmail.com>
c8fac50 to
00e50fa
Compare
Signed-off-by: Trae Robrock <trobrock@gmail.com>
11650b1 to
c0e8aba
Compare
DOsinga
reviewed
Jan 28, 2026
Collaborator
DOsinga
left a comment
There was a problem hiding this comment.
nice. I think the test is not doing much and the comment is a bit much
Collaborator
|
actually let me clone this PR and adjust and merge to get this in. thanks! |
Merged
Collaborator
|
continuing this in: #6815 closing this for now. thanks for your contribition! |
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
This adds a hook for when goose is waiting for input vs working. I'm often running multiple goose sessions in tmux tabs and having a wait to identify the tabs that are ready for my input is super useful.
Type of Change
AI Assistance
Testing
File /tmp/goose-status.sh
export GOOSE_STATUS_HOOK='/tmp/goose-status.sh'