Skip to content

Conversation

@alexhancock
Copy link
Collaborator

Right now we only have 20sec to enter our password when we run goose ui locally and goosed starts and needs the keychain password. I often miss it and goose turns into a brick, and needs to be relaunched. This will give 2min instead of 20sec.

@alexhancock alexhancock requested review from jamadeo and zanesq October 24, 2025 13:01
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.

this seems fine, but I wonder in general why we need this at all? it always reeks like either LLM generated defensive code that isn't really useful or is about something that happened at one point (goosed would not start) but not anymore

goosed exiting because of something is much more likely than goosed not starting. and we don't handle the password thing well anyway you say.

@alexhancock
Copy link
Collaborator Author

Good callout. I can look deeper and see if we even still need it.

@jamadeo
Copy link
Collaborator

jamadeo commented Oct 24, 2025

Is this just in dev mode? I thought I actually just ran into this with a built app when I had it configured for a provider that used oauth.

Another fix would be for /status to still return 200 even if we're waiting on a keyring or oauth or something. I'm actually not sure why it wouldn't. Do we not start serving until an agent is created or something?

@jamadeo
Copy link
Collaborator

jamadeo commented Oct 24, 2025

to put it another way, ideally we don't time out at all if we're waiting for the user to enter something. Maybe for oauth we need to because we don't know if they've closed the browser window, but for the password entry, timing out at all doesn't make much sense

@DOsinga
Copy link
Collaborator

DOsinga commented Oct 24, 2025

I think this is the password you enter to give goose access to your keychain and the timeout is how long we give goosed to become responsive

@alexhancock
Copy link
Collaborator Author

Good questions @jamadeo and I agree. I think it comes up more in development for two reasons I think:

  1. We wait a bit for rust to compile etc, so often when running just run-ui we multitask and forget to come back right when the app is available
  2. We need to enter our password every launch, whereas with built apps we only do it once for that build

But totally possible this bug exists in the built version of the app, which is actually quite rough...

I'll merge this to at least make it better for the moment and look closer at whether checkServerStatus can be improved or eliminated.

@alexhancock alexhancock merged commit b22abfc into main Oct 24, 2025
14 checks passed
@alexhancock alexhancock deleted the alexhancock/better-password-entry-timeout branch October 24, 2025 14:16
@jamadeo
Copy link
Collaborator

jamadeo commented Oct 24, 2025

I think this is the password you enter to give goose access to your keychain and the timeout is how long we give goosed to become responsive

right, yeah, but the combination of those effectively means you have X seconds to enter your password or the app dies, if I'm understanding this issue

the app should die if goosed doesn't start up, but it should not die if it's just waiting for user input

@alexhancock
Copy link
Collaborator Author

the app should die if goosed doesn't start up, but it should not die if it's just waiting for user input

yes agree. I've made it better in this PR as we now have a two minute timebomb instead of a 20s timebomb, but haven't fixed it. I'm unclear if it happens the same way in a built version of goose though. Will test now.

@jamadeo
Copy link
Collaborator

jamadeo commented Oct 24, 2025

huh, actually I'm also unable to replicate. if I start a newly built goosed, I get a "200 ok" from /status before it asks for keyring access

@DOsinga
Copy link
Collaborator

DOsinga commented Oct 24, 2025

but the user input request comes from goosed, so the electron app has no way to see if it is that. on the other hand, why does the /status handler not succeed? when I tested it, /status returns with the keychain box open, so when exactly do you see this error?

@alexhancock
Copy link
Collaborator Author

alexhancock commented Oct 24, 2025

on main prior to this commit if you just run-ui and wait longer than 20s to enter the password required for keychain access an error appears, Server failed to respond after 20s shows in the terminal logs, and goose is bricked

Screenshot 2025-10-24 at 10 29 18 AM

@DOsinga
Copy link
Collaborator

DOsinga commented Oct 24, 2025

I don't see this - running from the 1.12.0 branch

@alexhancock
Copy link
Collaborator Author

Attaching what I experience on main with a hard reset to 398cd1dfad8c73847f2d53f73cb1a8ef88312050 which is the commit from right before I merged this

goose-20s-timeout.mov

@jamadeo
Copy link
Collaborator

jamadeo commented Oct 24, 2025

yeah, something is off here, I can reproduce it when I run just run-ui, and the server prints as far as INFO goose::scheduler_factory: Creating legacy scheduler. But if I then run ./target/release/goosed agent directly, it begins serving (INFO goosed::commands::agent: listening on 127.0.0.1:3000) and does not ask for a password, and does respond to /status

@jamadeo
Copy link
Collaborator

jamadeo commented Oct 24, 2025

Ok, this is because as of #4684 we configure a provider using GOOSE_DEFAULT_PROVIDER / GOOSE_DEFAULT_MODEL before starting the server. This could block on oauth or password entry

wpfleger96 added a commit that referenced this pull request Oct 24, 2025
* main:
  chore: improve timeout for entering password when running goose ui from source (#5349)
  Fix legacy import (#5343)
  Unify loading goose messages and usechatstream determines chat state (#5306)
  Docs: goose session export and goose session import (#5267)
BlairAllan pushed a commit to BlairAllan/goose that referenced this pull request Oct 25, 2025
michaelneale added a commit that referenced this pull request Oct 26, 2025
* main:
  fixing typo in blog metadata (#5382)
  feat: add new blog entry on adopting Goose in the enterprise (#5381)
  Blog/acp intro oct 2024 (#5379)
  feat: add A/B test framework generator recipe (#5378)
  Doc: (blog) - Deep Dive into goose's Extension System and Model Context Protocol (MCP) (#5291)
  Some system prompt tidying (#5313)
  Fix scheduler jobs dates formatting (#5368)
  Use Instructions as Prompt in Scheduler (#5359)
  feat(snowflake): add support for newer Claude 4.5 and 4 models (#5350)
  Add bottom menu extension selection (#5352)
  (re)Standardize Session Name Attribute (#5279)
  chore: improve timeout for entering password when running goose ui from source (#5349)
michaelneale added a commit that referenced this pull request Oct 26, 2025
* main:
  fixing typo in blog metadata (#5382)
  feat: add new blog entry on adopting Goose in the enterprise (#5381)
  Blog/acp intro oct 2024 (#5379)
  feat: add A/B test framework generator recipe (#5378)
  Doc: (blog) - Deep Dive into goose's Extension System and Model Context Protocol (MCP) (#5291)
  Some system prompt tidying (#5313)
  Fix scheduler jobs dates formatting (#5368)
  Use Instructions as Prompt in Scheduler (#5359)
  feat(snowflake): add support for newer Claude 4.5 and 4 models (#5350)
  Add bottom menu extension selection (#5352)
  (re)Standardize Session Name Attribute (#5279)
  chore: improve timeout for entering password when running goose ui from source (#5349)
michaelneale added a commit that referenced this pull request Oct 27, 2025
* main: (54 commits)
  fixing typo in blog metadata (#5382)
  feat: add new blog entry on adopting Goose in the enterprise (#5381)
  Blog/acp intro oct 2024 (#5379)
  feat: add A/B test framework generator recipe (#5378)
  Doc: (blog) - Deep Dive into goose's Extension System and Model Context Protocol (MCP) (#5291)
  Some system prompt tidying (#5313)
  Fix scheduler jobs dates formatting (#5368)
  Use Instructions as Prompt in Scheduler (#5359)
  feat(snowflake): add support for newer Claude 4.5 and 4 models (#5350)
  Add bottom menu extension selection (#5352)
  (re)Standardize Session Name Attribute (#5279)
  chore: improve timeout for entering password when running goose ui from source (#5349)
  Fix legacy import (#5343)
  Unify loading goose messages and usechatstream determines chat state (#5306)
  Docs: goose session export and goose session import (#5267)
  Create recipe dir on save (#5337)
  docs: Update Discord link (#5335)
  [recipe workflow]: Fix `Invalid revision range` error  (#5334)
  Add tech-article-explainer recipe (#5333)
  doc: added beta banner for old blog post (#5332)
  ...
BlairAllan pushed a commit to BlairAllan/goose that referenced this pull request Nov 29, 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.

4 participants