(feat: backgroundable processes) goose gets stuck when running long running tasks #4064
Replies: 4 comments
-
This could be applicable to any long running service, not specific to Go. Perhaps goose could launch it as a background task, track the PID and send an appropriate stop signal to the process to end the process |
Beta Was this translation helpful? Give feedback.
-
thanks - yes this is a sort of general challenge, and partly by design (the timeouts are not, and things being addressed there) but there needs to be some discussion on best way to address this. For We did have this in an earlier version of goose (I believe when it was python) when it would detect and background things, which was ok, but for most users caused a lot more hassles than it solved. The Firstly need a fairly strong way to know it is a server process/background thing, not just long running. if it is long running, then it probably shouldn't just background it, but could report progress. So to be clear - this is for non terminating things we want to identify and handle: break it off as a process and then have goose track it (but has to be fairly iron clad or it can be left hanging if the main process exits, so want to make sure the ownership is setup right). This change I think is localised to developer MCP (correct me if wrong?) so could have some alternative approaches for people to opt in to. One unknown is how to start a process and then decide, at a later point, that it actually is a background service (for example). is this something we can elide up front, or is it based on timeouts, is it based on patterns or a LLM tool call itself (ie the command could be augmented to let it run in the background and a smart LLM would know that the intention is to run it in the background). I think it is this latter one I prefer: ie we enhance developer/mod.rs around Love your thoughts @iandouglas @eislambey |
Beta Was this translation helpful? Give feedback.
-
additional thought: timeouts on processes could return a meaningful error which the agentloop will handle, and the LLM can then decide to re-invoke as a background process (that would be one way for it to automatically detect. he is OOO right now but @baxen and I sometimes discuss this as we did an early version cc @DOsinga might have some fresh thoughts. |
Beta Was this translation helpful? Give feedback.
-
Let me send this thread to them to take a look at! Thank you so much for raising this discussion. <3 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
I am using goose to develop a Go project from scratch. When goose attempts to start the server using the command
go run main.go
, it gets stuck and eventually times out. The expected behavior is for the server to run in the background, check the logs, health, etc., and then stop it gracefully.To Reproduce
goose run -t "build me an url shortener app using golang. dont use any dependency and create a minimal ui"
Expected behavior
Goose should start the server in the background, monitor its logs, endpoints, and stop it when needed.
Please provide following information:
Additional context
Session Logs
Beta Was this translation helpful? Give feedback.
All reactions