Skip to content

fix: check if working directory has changed before asking#1733

Merged
kalvinnchau merged 2 commits intoblock:mainfrom
matt2e:main
Mar 19, 2025
Merged

fix: check if working directory has changed before asking#1733
kalvinnchau merged 2 commits intoblock:mainfrom
matt2e:main

Conversation

@matt2e
Copy link
Contributor

@matt2e matt2e commented Mar 17, 2025

When running goose run --resume --text 'hello goose' I get this prompt:

WARNING: The working directory of this session was set to <path>. It does not match the current working directory. Would you like to change it?

When I run pwd I get the exact same path.

This is doubly an issue for my use case as I am trying to run goose in a non-interactive environment, in which case the error I get is:

thread 'main' panicked at /Users/runner/work/goose/goose/crates/goose-cli/src/session/builder.rs:82:29:
Failed to get user input: Kind(NotConnected)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
goose failed: exit status 101

I have added a check so that the user prompt only occurs if the current working directory does not match the path found in the existing session.

Copy link
Contributor

@kalvinnchau kalvinnchau left a comment

Choose a reason for hiding this comment

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

nice!

@kalvinnchau kalvinnchau changed the title fix: check if working direction has changed before asking fix: check if working directory has changed before asking Mar 19, 2025
@kalvinnchau
Copy link
Contributor

closes #1770

@kalvinnchau kalvinnchau merged commit c6fab27 into block:main Mar 19, 2025
6 checks passed
michaelneale added a commit that referenced this pull request Mar 20, 2025
* main:
  fix: check if working directory has changed before asking (#1733)
  extensions: add a display name field (#1759)
  ui: add logs to app (#1760)
  docs: add stdin (#1769)
  config: add optional extension description (#1743)
  docs: add deployment for install link generator (#1737)
  ui: new configure provider flow (#1736)
  Revert "Standardize Radio Button input" (#1758)
  Settings v2 Add Model (#1708)
  fix: use lowercase names for builtin external extensions (#1756)
ahau-square pushed a commit that referenced this pull request Mar 21, 2025
* origin/main: (74 commits)
  docs: add youtube vscode short (#1809)
  blog: Goose Boston Meetup (#1805)
  docs: Choosing the Right Prompting Style Blog  (#1794)
  docs: Asana tutorial (#1806)
  docs: add langfuse tutorial to blog (#1755)
  docs: Add VS Code tutorial (#1798)
  feat: can read and write to google sheets now (#1784)
  tweak darkmode for modal (#1797)
  docs: asana and gcal blog post (#1796)
  fix: update experimental features docs (#1781)
  docs: Remove Installer Link From Filesystem Tutorial (#1795)
  alexhancock/remove-little-gap (#1793)
  fix: #1562 - Only show text portion of goose message if there is text to display (#1791)
  feat: add /plan command in CLI to invoke reasoner with plan system prompt (#1616)
  docs: Adding Trigger Words to Memory Tutorial (#1783)
  docs: Add prompt completion (#1787)
  fix: check if working directory has changed before asking (#1733)
  extensions: add a display name field (#1759)
  ui: add logs to app (#1760)
  docs: add stdin (#1769)
  ...
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
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.

2 participants

Comments