Skip to content

Tokens are wrong (dies at 70%) (Anthropic/claude sonnet) #3150

@CyphrRiot

Description

@CyphrRiot

I am using Anthropic Claude Sonnet 4.

I get this error (crash) when running:

Failed to parse response: Request failed: 
Provider returned error (code: 400) (status 400)
    at crates/goose/src/agents/agent.rs:770

Ran into this error: Request failed: Failed to parse response: 
Request failed: Provider returned error (code: 400) (status 400).

Please retry if you think this is a transient or recoverable error.
Context: ●●●●●●●○○○ 70% (140894/200000 tokens)

As you can see, the context is less than 200,000 tokens (Sonnet 4s token amount), but Goose crashes and runs out of tokens with a terrible error.

Metadata

Metadata

Assignees

Labels

p1Priority 1 - High (supports roadmap)waiting

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions