Skip to content

Conversation

@trobrock
Copy link
Contributor

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

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

File /tmp/goose-status.sh

#!/bin/bash
status="$1"
case "$status" in
  waiting)  icon="🟢" ;;   # green = ready for input
  thinking) icon="🤔" ;;   # thinking
  *)        icon="🦆" ;;
esac
tmux rename-window "goose $icon"

export GOOSE_STATUS_HOOK='/tmp/goose-status.sh'

@trobrock trobrock requested a review from a team as a code owner January 25, 2026 12:53
Copilot AI review requested due to automatic review settings January 25, 2026 12:53
@trobrock trobrock force-pushed the hook-thinking-status branch from 0f5866b to 21fc2b2 Compare January 25, 2026 12:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_HOOK environment 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

Copilot AI review requested due to automatic review settings January 25, 2026 13:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

@DOsinga DOsinga requested a review from baxen January 26, 2026 13:23
Copilot AI review requested due to automatic review settings January 27, 2026 20:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@trobrock trobrock force-pushed the hook-thinking-status branch from 9ce5bfd to c8fac50 Compare January 27, 2026 21:34
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 <[email protected]>
@trobrock trobrock force-pushed the hook-thinking-status branch from c8fac50 to 00e50fa Compare January 27, 2026 21:35
Copilot AI review requested due to automatic review settings January 28, 2026 16:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Copy link
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice. I think the test is not doing much and the comment is a bit much

@DOsinga
Copy link
Collaborator

DOsinga commented Jan 28, 2026

actually let me clone this PR and adjust and merge to get this in. thanks!

@DOsinga DOsinga mentioned this pull request Jan 29, 2026
@DOsinga
Copy link
Collaborator

DOsinga commented Jan 29, 2026

continuing this in: #6815

closing this for now. thanks for your contribition!

@DOsinga DOsinga closed this Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants