Skip to content

fix(token_counter): fix panic with GitHub Copilot#4632

Merged
DOsinga merged 1 commit intoblock:mainfrom
understood-the-assignment:fix-copilot-tool-use
Sep 29, 2025
Merged

fix(token_counter): fix panic with GitHub Copilot#4632
DOsinga merged 1 commit intoblock:mainfrom
understood-the-assignment:fix-copilot-tool-use

Conversation

@understood-the-assignment
Copy link
Copy Markdown
Contributor

Pull Request Description

Fix the following panic:

thread 'main' panicked at crates/goose/src/token_counter.rs:93:82: no entry found for key
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This seems to occur when GitHub Copilot attempts to use a tool.

Fix the following panic:

thread 'main' panicked at crates/goose/src/token_counter.rs:93:82:
no entry found for key
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This seems to occur when GitHub Copilot attempts to use a tool.

Signed-off-by: sings-to-bees-on-wednesdays <[email protected]>
@Peng-YM
Copy link
Copy Markdown

Peng-YM commented Sep 14, 2025

Some issue here with custom litellm provider

image

@understood-the-assignment
Copy link
Copy Markdown
Contributor Author

Some issue here with custom litellm provider

It's probably the same problem. Can you try building goose with this PR and see if it helps?

@Peng-YM
Copy link
Copy Markdown

Peng-YM commented Sep 22, 2025

Some issue here with custom litellm provider

It's probably the same problem. Can you try building goose with this PR and see if it helps?

Sorry, I'm not very familiar with Rust's build process. May I ask when this issue is planned to be fixed?

@freccon
Copy link
Copy Markdown

freccon commented Sep 25, 2025

It’s a pity this didn’t make it into the last release... I still can’t use the app. I’ll keep waiting ⏳ I’m also interested in knowing when it will be released.

@wgkoro
Copy link
Copy Markdown

wgkoro commented Sep 25, 2025

Maybe I got same error with GEMINI-CLI. I'm waiting for fix this issue...
スクリーンショット 2025-09-25 19 03 57

@kouk
Copy link
Copy Markdown

kouk commented Sep 26, 2025

This PR fixes the issue for me with LiteLLM:

goose on  fix-copilot-tool-use ...................................................................................................................................................took 53s
❯ ./target/debug/goose session

starting session | provider: litellm model: claude-4-sonnet-complai
    logging to /Users/kkoukopoulos/.local/share/goose/sessions/20250926_165355.jsonl
    working directory: /Users/kkoukopoulos/Code/github.com/block/goose

Goose is running! Enter your instructions, or try asking what goose can do.

Context: ○○○○○○○○○○ 0% (0/200000 tokens)
( O)> summarize the README.md file
I'll read and summarize the README.md file for you.
─── text_editor | developer ──────────────────────────
path: ~/Code/github.com/block/goose/README.md
command: view

# README.md Summary

**Goose** is an open-source AI agent framework developed by Block that automates complex engineering tasks end-to-end.

Copy link
Copy Markdown
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.

Thanks for doing this and sorry letting this linger. there of course some other places we're accessing fields here without checking, but this is a good start!

@DOsinga DOsinga merged commit 509fcac into block:main Sep 29, 2025
9 of 10 checks passed
katzdave pushed a commit that referenced this pull request Sep 30, 2025
Signed-off-by: sings-to-bees-on-wednesdays <[email protected]>

main was broken. this seems important
@katzdave katzdave mentioned this pull request Sep 30, 2025
zanesq added a commit that referenced this pull request Sep 30, 2025
…-unification

* 'main' of github.com:block/goose: (24 commits)
  feat(cli): add `path` & `limit` to `session list` command (#4878)
  Allow better concurrent access (#4896)
  fix: Windows prompt cursor positioning issue with ANSI escape sequences (#4464)
  Fix: LiteLLM API key field not showing in UI configuration (#4105)
  fix: path is duplicated on tool calls causing them to fail (#4658) (#4859)
  add new prompt to get all available tutorials (#4802)
  Add filtering for agentVisible: false messages on streaming providers (#4847)
  alexhancock/mcp-crate-cleanup (#4885)
  docs: rename sub-recipe to subrecipe (#4886)
  docs: new multi-model section with autopilot topic (#4864)
  make agent manager singleton (#4880)
  Cli web auth token (#4456)
  fix(token_counter): fix panic with GitHub Copilot (#4632)
  Revert "Internal MCP Crate Cleanup (#4800)" (#4883)
  remove 2 redundant comments and one that lies (#4866)
  Internal MCP Crate Cleanup (#4800)
  Fix #4612: Return non-zero exit code when CLI session ends with error (#4621)
  Dead code cleanup (#4873)
  fix: restoring test data and correcting name (#4875)
  Add .goosehints file to enforce lowercase branding in documentation (#4870)
  ...
wpfleger96 added a commit to wpfleger96/goose that referenced this pull request Oct 1, 2025
* main: (206 commits)
  Tiny: fix github casing  (block#4903)
  remove anyOf from create_task tool (block#4897)
  chore(deps): bump tracing-subscriber from 0.3.19 to 0.3.20 (block#4442)
  fix optional recipe schema zod validation (block#4900)
  Added CMD+T keyboard shortcut that takes you to the Home tab (block#4541)
  feat(cli): add `path` & `limit` to `session list` command (block#4878)
  Allow better concurrent access (block#4896)
  fix: Windows prompt cursor positioning issue with ANSI escape sequences (block#4464)
  Fix: LiteLLM API key field not showing in UI configuration (block#4105)
  fix: path is duplicated on tool calls causing them to fail (block#4658) (block#4859)
  add new prompt to get all available tutorials (block#4802)
  Add filtering for agentVisible: false messages on streaming providers (block#4847)
  alexhancock/mcp-crate-cleanup (block#4885)
  docs: rename sub-recipe to subrecipe (block#4886)
  docs: new multi-model section with autopilot topic (block#4864)
  make agent manager singleton (block#4880)
  Cli web auth token (block#4456)
  fix(token_counter): fix panic with GitHub Copilot (block#4632)
  Revert "Internal MCP Crate Cleanup (block#4800)" (block#4883)
  remove 2 redundant comments and one that lies (block#4866)
  ...
HikaruEgashira pushed a commit to HikaruEgashira/goose that referenced this pull request Oct 3, 2025
Signed-off-by: sings-to-bees-on-wednesdays <[email protected]>

main was broken. this seems important

Signed-off-by: HikaruEgashira <[email protected]>
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.

6 participants