Skip to content

Subagent appears to exceed the configured contextWindowSize, while main agent doesn't #3664

@clancybufton-pixel

Description

@clancybufton-pixel

What happened?

│ ✓ Agent Explore project codebase │
│ │
│ Explore ● Failed │
│ │
│ Failed: Failed to run subagent: 400 This model's maximum context length is 64000 tokens. However, you requested 0 output tokens and your prompt │
│ contains at least 64001 input tokens, for a total of at least 64001 tokens. Please reduce the length of the input prompt or the number of │
│ requested output tokens. (parameter=input_tokens, value=64001)

What did you expect to happen?

The main agent does not appear to have this issue as it compacts context before it reaches the limit. Also note that server limit is higher than configured qwen code limit: "generationConfig": {
"contextWindowSize": 60000,

Client information

Client Information

Run qwen to enter the interactive CLI, then run the /about command.

$ qwen /about
Status                                                                                           │
  │                                                                                                  │
  │ Qwen Code                         0.15.3 (dad983203)                                             │
  │ Runtime                           Node.js v20.18.1 / npm 10.8.2                                  │
  │ OS                                win32 x64 (10.0.26200)                                         │
  │                                                                                                  │
  │ Auth                              API Key - openai                                               │
  │ Base URL                          http://10.6.0.232:8000/v1                                      │
  │ Model                             cyankiwi/Qwen3.6-27B-AWQ-INT4                                  │
  │ Fast Model                        cyankiwi/Qwen3.6-27B-AWQ-INT4                                  │
  │ Session ID                        d6f7e45b-8707-4545-9dee-630e89880101                           │
  │ Sandbox                           no sandbox                                                     │
  │ Proxy                             no proxy                                                       │
  │ Memory Usage                      205.4 MB                                        

Login information

This is local vllm

Anything else we need to know?

No response

Metadata

Metadata

Assignees

Labels

status/needs-triageIssue needs to be triaged and labeledtype/bugSomething isn't working as expected

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions