Show highlevel summary of what is currently being executed and what amount was charged
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Currently a lot of the process is hidden in the logs. For users to have a better understanding of what happens we should show some highlevel information about the Job on the Job detail page.
For example:
+ checking out repository
+ looking at the code
+ understanding the issue
+ coding
+ reviewing the changes
+ opening the pull request
EDITED by Roland: I think the logs can be analyzed to know what state is at - using keywords. Here's an example job:
```
2025-06-16T09:01:05.711Z [INFO] Preparing repository {}
2025-06-16T09:01:05.723Z [INFO] extracted repository from issue URL {"repo":"hub","owner":"getAlby","repoUrl":"https://github.com/getAlby/hub","issueNumber":1409}
2025-06-16T09:01:05.724Z [INFO] forking repository {"repo":"hub","owner":"getAlby"}
2025-06-16T09:01:06.112Z [INFO] cloning forked repository {"repo":"hub","owner":"getAlby"}
2025-06-16T09:01:16.677Z [INFO] Launching agent {}
2025-06-16T09:01:16.687Z [INFO] Spawning goose process {}
2025-06-16T09:01:16.698Z [INFO] Spawned process: ["/root/.local/bin/goose2","run","--with-builtin=developer","-t \"Follow the following steps in order:\n \n 1. *Locally* checkout a new branch to address the issue. Prefix it with feat/ for features or chore/ or fix/ etc based on the type of change. Suffix the branch with -8\n 2. *Locally* address the issue by making the relevant file changes. Don't show me the code and don't try to run the app.\n 3. *Locally* commit the changes on the current branch with a meaningful description.\n\n The issue content is below:\n\n Fix startup error handling\n\nIn both the http and wails startup code we have:\n```\nsvc, _ := service.NewService(ctx)\n```\n\nWe should correctly handle the error and exit (currently it will cause a panic somewhere later if NewService returns an error).\n\nExample where this happens: unable to connect to the postgres database.\n \""] {}
2025-06-16T09:01:17.800Z [INFO] starting session | provider: openrouter model: anthropic/claude-sonnet-4
logging to /root/.local/share/goose/sessions/20250616_090117.jsonl
working directory: /data/jobs/8/hub
{}
2025-06-16T09:01:20.348Z [INFO] 2025-06-16T09:01:20.347720Z WARN goose::agents::agent: NWC URLs set. Service requires payment of 1000 sats. Message: initial service fee
at crates/goose/src/agents/agent.rs:586
{}
2025-06-16T09:01:30.887Z [INFO] 2025-06-16T09:01:30.885945Z WARN goose::agents::agent: pay invoice response PayInvoiceResponse { preimage: "811dcae624bf98931d92824481b973fd78d8e3a0838ae7790e5b78f70db52d41" }
at crates/goose/src/agents/agent.rs:623
{}
2025-06-16T09:01:33.592Z [INFO] 2025-06-16T09:01:33.587305Z WARN goose::agents::agent: usage cost Usage { input_tokens: Some(2661), output_tokens: Some(100), total_tokens: Some(2761) } cost: 10 sats
at crates/goose/src/agents/agent.rs:662
2025-06-16T09:01:33.587423Z WARN goose::agents::agent: NWC URLs set. Service requires payment of 10 sats. Message: agent iteration tokens: 2661 input, 100 output
at crates/goose/src/agents/agent.rs:586
{}
2025-06-16T09:01:44.070Z [INFO] 2025-06-16T09:01:44.069150Z WARN goose::agents::agent: pay invoice response PayInvoiceResponse { preimage: "ebc56aba44515828e0915d958c418d8e5a657e5e308b93167db9fb7ef0593679" }
at crates/goose/src/agents/agent.rs:623
{}
2025-06-16T09:01:44.087Z [INFO] I'll help you fix the startup error handling issue. Let me follow the steps in order.
{}
2025-06-16T09:01:44.088Z [INFO]
## Step 1: Create a new branch
{}
2025-06-16T09:01:44.089Z [INFO] First, let me check the current git status and create a new branch:
{}
2025-06-16T09:01:44.090Z [INFO] ─── shell | developer ──────────────────────────
{}
2025-06-16T09:01:44.090Z [INFO] command: git status
{}
2025-06-16T09:01:44.143Z [INFO]
{}
2025-06-16T09:01:47.080Z [INFO] 2025-06-16T09:01:47.076916Z WARN goose::agents::agent: usage cost Usage { input_tokens: Some(2799), output_tokens: Some(65), total_tokens: Some(2864) } cost: 10 sats
at crates/goose/src/agents/agent.rs:662
2025-06-16T09:01:47.077062Z WARN goose::agents::agent: NWC URLs set. Service requires payment of 10 sats. Message: agent iteration tokens: 2799 input, 65 output
at crates/goose/src/agents/agent.rs:586
{}
2025-06-16T09:01:55.252Z [INFO] 2025-06-16T09:01:55.250584Z WARN goose::agents::agent: pay invoice response PayInvoiceResponse { preimage: "7a0cec03cf596814dbc7911972aedd0d4fbfcb33f31c78f3eb39c00513f644e3" }
at crates/goose/src/agents/agent.rs:623
{}
2025-06-16T09:01:55.263Z [INFO]
{}
2025-06-16T09:01:55.268Z [INFO] ─── shell | developer ──────────────────────────
command: git checkout -b fix/startup-error-handling-8
{}
2025-06-16T09:01:55.279Z [INFO]
{}
2025-06-16T09:01:58.187Z [INFO] 2025-06-16T09:01:58.187151Z WARN goose::agents::agent: usage cost Usage { input_tokens: Some(2895), output_tokens: Some(113), total_tokens: Some(3008) } cost: 11 sats
at crates/goose/src/agents/agent.rs:662
{}
2025-06-16T09:01:58.191Z [INFO] 2025-06-16T09:01:58.187920Z WARN goose::agents::agent: NWC URLs set. Service requires payment of 11 sats. Message: agent iteration tokens: 2895 input, 113 output
at crates/goose/src/agents/agent.rs:586
{}
2025-06-16T09:02:07.433Z [INFO] 2025-06-16T09:02:07.432123Z WARN goose::agents::agent: pay invoice response PayInvoiceResponse { preimage: "7797af7b2edc1e3c8d222b79ba25cd7a87c948879ae0d71b4066990c744398a4" }
at crates/goose/src/agents/agent.rs:623
{}
2025-06-16T09:02:07.452Z [INFO] ## Step 2: Find and fix the startup error handling
{}
2025-06-16T09:02:07.453Z [INFO]
{}
2025-06-16T09:02:07.457Z [INFO] Let me locate the files containing the HTTP and Wails startup code with the problematic error handling:
{}
2025-06-16T09:02:07.459Z [INFO] ─── shell | developer ──────────────────────────
command: rg "svc, _ := service.NewService\(ctx\)" -A 5 -B 5
{}
2025-06-16T09:02:07.466Z [INFO]
{}
2025-06-16T09:02:10.129Z [INFO] 2025-06-16T09:02:10.129221Z WARN goose::agents::agent: usage cost Usage { input_tokens: Some(3033), output_tokens: Some(78), total_tokens: Some(3111) } cost: 11 sats
at crates/goose/src/agents/agent.rs:662
{}
2025-06-16T09:02:10.131Z [INFO] 2025-06-16T09:02:10.130018Z WARN goose::agents::agent: NWC URLs set. Service requires payment of 11 sats. Message: agent iteration tokens: 3033 input, 78 output
at crates/goose/src/agents/agent.rs:586
{}
2025-06-16T09:02:21.603Z [INFO] 2025-06-16T09:02:21.602192Z WARN goose::agents::agent: pay invoice response PayInvoiceResponse { preimage: "1af06cd7cd48beb71f4fed880456c01887437fbf25daa6fb58187b8f058e8c11" }
at crates/goose/src/agents/agent.rs:623
{}
2025-06-16T09:02:21.614Z [INFO]
{}
2025-06-16T09:02:21.615Z [INFO] ─── shell | developer ──────────────────────────
command: grep -r "svc, _ := service.NewService(ctx)" . -A 5 -B 5
{}
2025-06-16T09:02:21.697Z [INFO]
{}
2025-06-16T09:02:24.657Z [INFO] 2025-06-16T09:02:24.657277Z WARN goose::agents::agent: usage cost Usage { input_tokens: Some(3557), output_tokens: Some(102), total_tokens: Some(3659) } cost: 13 sats
at crates/goose/src/agents/agent.rs:662
{}
2025-06-16T09:02:24.659Z [INFO] 2025-06-16T09:02:24.658023Z WARN goose::agents::agent: NWC URLs set. Service requires payment of 13 sats. Message: agent iteration tokens: 3557 input, 102 output
at crates/goose/src/agents/agent.rs:586
{}
2025-06-16T09:02:32.776Z [INFO] 2025-06-16T09:02:32.775869Z WARN goose::agents::agent: pay invoice response PayInvoiceResponse { preimage: "f7925d1536f5427436bfbbc20709c74adfe167f2ba82702db9f533910022424d" }
at crates/goose/src/agents/agent.rs:623
{}
2025-06-16T09:02:32.797Z [INFO] Great! I found both files that need fixing. Let me examine them more closely and then fix the error handling:
─── text_editor | developer ──────────────────────────
path: ./main_wails.go
command: view
{}
2025-06-16T09:02:32.801Z [INFO]
{}
2025-06-16T09:02:35.484Z [INFO] 2025-06-16T09:02:35.484216Z WARN goose::agents::agent: usage cost Usage { input_tokens: Some(3710), output_tokens: Some(86), total_tokens: Some(3796) } cost: 13 sats
at crates/goose/src/agents/agent.rs:662
{}
2025-06-16T09:02:35.487Z [INFO] 2025-06-16T09:02:35.485042Z WARN goose::agents::agent: NWC URLs set. Service requires payment of 13 sats. Message: agent iteration tokens: 3710 input, 86 output
at crates/goose/src/agents/agent.rs:586
{}
2025-06-16T09:02:43.961Z [INFO] 2025-06-16T09:02:43.960045Z WARN goose::agents::agent: pay invoice response PayInvoiceResponse { preimage: "b31139e68108e71287d77f7333295510817dfa427e438c7960919b3754141abe" }
at crates/goose/src/agents/agent.rs:623
{}
2025-06-16T09:02:43.973Z [INFO]
─── text_editor | developer ──────────────────────────
path: /data/jobs/8/hub/main_wails.go
command: view
{}
2025-06-16T09:02:43.982Z [INFO]
{}
2025-06-16T09:02:46.847Z [INFO] 2025-06-16T09:02:46.847307Z WARN goose::agents::agent: usage cost Usage { input_tokens: Some(4200), output_tokens: Some(87), total_tokens: Some(4287) } cost: 14 sats
at crates/goose/src/agents/agent.rs:662
{}
2025-06-16T09:02:46.850Z [INFO] 2025-06-16T09:02:46.848071Z WARN goose::agents::agent: NWC URLs set. Service requires payment of 14 sats. Message: agent iteration tokens: 4200 input, 87 output
at crates/goose/src/agents/agent.rs:586
{}
2025-06-16T09:02:56.135Z [INFO] 2025-06-16T09:02:56.134874Z WARN goose::agents::agent: pay invoice response PayInvoiceResponse { preimage: "fb8a9e810d491889be347c8638d66a014cac93b2e65a1746b45de519c3eee093" }
at crates/goose/src/agents/agent.rs:623
{}
2025-06-16T09:02:56.150Z [INFO]
{}
2025-06-16T09:02:56.152Z [INFO] ─── text_editor | developer ──────────────────────────
path: /data/jobs/8/hub/cmd/http/main.go
command: view
{}
2025-06-16T09:02:56.156Z [INFO]
{}
2025-06-16T09:03:00.647Z [INFO] 2025-06-16T09:03:00.643973Z WARN goose::agents::agent: usage cost Usage { input_tokens: Some(4936), output_tokens: Some(265), total_tokens: Some(5201) } cost: 19 sats
at crates/goose/src/agents/agent.rs:662
2025-06-16T09:03:00.644039Z WARN goose::agents::agent: NWC URLs set. Service requires payment of 19 sats. Message: agent iteration tokens: 4936 input, 265 output
at crates/goose/src/agents/agent.rs:586
{}
2025-06-16T09:03:10.344Z [INFO] 2025-06-16T09:03:10.344509Z WARN goose::agents::agent: pay invoice response PayInvoiceResponse { preimage: "a1845c1b2ce25b20e9a56b2124650c9951c5086028da8736ad627bf8d55cf8a2" }
at crates/goose/src/agents/agent.rs:623
{}
2025-06-16T09:03:10.366Z [INFO] Now I'll fix both files to properly handle the error from `service.NewService(ctx)`:
{}
2025-06-16T09:03:10.368Z [INFO] ─── text_editor | developer ──────────────────────────
path: /data/jobs/8/hub/main_wails.go
command: str_replace
new_str: ...
old_str: ...
{}
2025-06-16T09:03:10.375Z [INFO]
{}
2025-06-16T09:03:15.074Z [INFO] 2025-06-16T09:03:15.074423Z WARN goose::agents::agent: usage cost Usage { input_tokens: Some(5401), output_tokens: Some(210), total_tokens: Some(5611) } cost: 20 sats
at crates/goose/src/agents/agent.rs:662
{}
2025-06-16T09:03:15.075Z [INFO] 2025-06-16T09:03:15.075550Z WARN goose::agents::agent: NWC URLs set. Service requires payment of 20 sats. Message: agent iteration tokens: 5401 input, 210 output
at crates/goose/src/agents/agent.rs:586
{}
2025-06-16T09:03:23.519Z [INFO] 2025-06-16T09:03:23.516834Z WARN goose::agents::agent: pay invoice response PayInvoiceResponse { preimage: "cd848381e597eed9e6c5253a87701adfffb0c726cae3292ef43f55b814102bb9" }
at crates/goose/src/agents/agent.rs:623
{}
2025-06-16T09:03:23.532Z [INFO]
{}
2025-06-16T09:03:23.535Z [INFO] ─── text_editor | developer ──────────────────────────
path: /data/jobs/8/hub/cmd/http/main.go
command: str_replace
new_str: ...
old_str: ...
{}
2025-06-16T09:03:23.537Z [INFO]
{}
2025-06-16T09:03:26.819Z [INFO] 2025-06-16T09:03:26.815794Z WARN goose::agents::agent: usage cost Usage { input_tokens: Some(5817), output_tokens: Some(89), total_tokens: Some(5906) } cost: 19 sats
at crates/goose/src/agents/agent.rs:662
2025-06-16T09:03:26.815954Z WARN goose::agents::agent: NWC URLs set. Service requires payment of 19 sats. Message: agent iteration tokens: 5817 input, 89 output
at crates/goose/src/agents/agent.rs:586
{}
2025-06-16T09:03:36.691Z [INFO] 2025-06-16T09:03:36.689058Z WARN goose::agents::agent: pay invoice response PayInvoiceResponse { preimage: "9964a98f015f9a94c921f215e9620766bbec6f37f161e14525dc46bd45cc8a06" }
at crates/goose/src/agents/agent.rs:623
{}
2025-06-16T09:03:36.711Z [INFO] ## Step 3: Commit the changes
{}
2025-06-16T09:03:36.711Z [INFO]
{}
2025-06-16T09:03:36.713Z [INFO] Now let me commit these changes with a meaningful description:
{}
2025-06-16T09:03:36.719Z [INFO] ─── shell | developer ──────────────────────────
command: git add main_wails.go cmd/http/main.go
{}
2025-06-16T09:03:36.730Z [INFO]
{}
2025-06-16T09:03:38.715Z [INFO] 2025-06-16T09:03:38.715237Z WARN goose::agents::agent: usage cost Usage { input_tokens: Some(5918), output_tokens: Some(54), total_tokens: Some(5972) } cost: 19 sats
at crates/goose/src/agents/agent.rs:662
{}
2025-06-16T09:03:38.719Z [INFO] 2025-06-16T09:03:38.716067Z WARN goose::agents::agent: NWC URLs set. Service requires payment of 19 sats. Message: agent iteration tokens: 5918 input, 54 output
at crates/goose/src/agents/agent.rs:586
{}
2025-06-16T09:03:49.877Z [INFO] 2025-06-16T09:03:49.875813Z WARN goose::agents::agent: pay invoice response PayInvoiceResponse { preimage: "a2185cb49b1c5b1fd167b8a1063cd38e5278eb8c5ff41fc2184502b12bab5ba4" }
at crates/goose/src/agents/agent.rs:623
{}
2025-06-16T09:03:49.888Z [INFO]
{}
2025-06-16T09:03:49.891Z [INFO] ─── shell | developer ──────────────────────────
command: git status
{}
2025-06-16T09:03:49.909Z [INFO]
{}
2025-06-16T09:03:55.291Z [INFO] 2025-06-16T09:03:55.289004Z WARN goose::agents::agent: usage cost Usage { input_tokens: Some(6041), output_tokens: Some(143), total_tokens: Some(6184) } cost: 21 sats
at crates/goose/src/agents/agent.rs:662
2025-06-16T09:03:55.289059Z WARN goose::agents::agent: NWC URLs set. Service requires payment of 21 sats. Message: agent iteration tokens: 6041 input, 143 output
at crates/goose/src/agents/agent.rs:586
{}
2025-06-16T09:04:07.057Z [INFO] 2025-06-16T09:04:07.054424Z WARN goose::agents::agent: pay invoice response PayInvoiceResponse { preimage: "f14c656469ad111bc9a591b13427053bd45cc22e3d58a14233f9785fc167b626" }
at crates/goose/src/agents/agent.rs:623
{}
2025-06-16T09:04:07.067Z [INFO]
{}
2025-06-16T09:04:07.070Z [INFO] ─── shell | developer ──────────────────────────
command: git commit -m "fix: handle errors from service.NewService() in startup code
Previously, both HTTP and Wails startup code ignored errors from
service.NewService(ctx) using blank identifier (_), which could
cause panics later if NewService fails (e.g., unable to connect
to postgres database).
Now properly handle the error and exit gracefully with a fatal
log message when service initialization fails."
{}
2025-06-16T09:04:07.095Z [INFO]
{}
2025-06-16T09:04:12.502Z [INFO] 2025-06-16T09:04:12.502362Z WARN goose::agents::agent: usage cost Usage { input_tokens: Some(6247), output_tokens: Some(164), total_tokens: Some(6411) } cost: 22 sats
at crates/goose/src/agents/agent.rs:662
{}
2025-06-16T09:04:12.505Z [INFO] 2025-06-16T09:04:12.503492Z WARN goose::agents::agent: NWC URLs set. Service requires payment of 22 sats. Message: agent iteration tokens: 6247 input, 164 output
at crates/goose/src/agents/agent.rs:586
{}
2025-06-16T09:04:23.241Z [INFO] 2025-06-16T09:04:23.238751Z WARN goose::agents::agent: pay invoice response PayInvoiceResponse { preimage: "88b0fba001a08e14dfcaa549ba57da1f8b44e4e44a124621ae018e6a5430ef2a" }
at crates/goose/src/agents/agent.rs:623
{}
2025-06-16T09:04:23.262Z [INFO] ## Summary
I have successfully completed all three steps:
1. ✅ **Created branch**: `fix/startup-error-handling-8` locally
2. ✅ **Fixed the issue**: Updated both `main_wails.go` and `cmd/http/main.go` to properly handle errors from `service.NewService(ctx)` instead of ignoring them with `_`
3. ✅ **Committed changes**: Created a meaningful commit with detailed description explaining what was fixed and why
{}
2025-06-16T09:04:23.264Z [INFO] The changes ensure that if `service.NewService()` returns an error (such as when unable to connect to the postgres database), the application will exit gracefully with a clear error message instead of potentially panicking later.
{}
2025-06-16T09:04:23.382Z [INFO] getting branch name {}
2025-06-16T09:04:23.391Z [INFO] got branch name {"branchname":"fix/startup-error-handling-8"}
2025-06-16T09:04:23.392Z [INFO] pushing branch {}
2025-06-16T09:04:24.913Z [INFO] getting upstream repository data {}
2025-06-16T09:04:25.209Z [INFO] getting branch logs {}
2025-06-16T09:04:25.221Z [INFO] creating pull request {"pullRequestParams":{"owner":"getAlby","repo":"hub","head":"freepilot-bot:fix/startup-error-handling-8","base":"master","body":"Fixes https://github.com/getAlby/hub/issues/1409\n\ncommit 71db2db2bab36b2604c3a9522a49641cd0087cf8\nAuthor: freepilot-bot <215356755+freepilot-bot@users.noreply.github.com>\nDate: Mon Jun 16 09:04:07 2025 +0000\n\n fix: handle errors from service.NewService() in startup code\n \n Previously, both HTTP and Wails startup code ignored errors from\n service.NewService(ctx) using blank identifier (_), which could\n cause panics later if NewService fails (e.g., unable to connect\n to postgres database).\n \n Now properly handle the error and exit gracefully with a fatal\n log message when service initialization fails.\n","title":"[Freepilot] fix: startup error handling","maintainer_can_modify":true}}
2025-06-16T09:04:26.248Z [INFO] successfully created pull request {}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.