Skip to content

ContextWindowExceededError when single code_execution_tool output exceeds context limit (compression doesn't help) #833

@rabata1

Description

@rabata1

Hey,

I'm having an issue where the agent crashes when using code_execution_tool and the command output is too long.

For example, if I run a command like git submodule update or a build command that produces a lot of output, the agent immediately crashes with:

litellm.BadRequestError: ContextWindowExceededError

It seems like the output from the command is too large and exceeds the context window. The history compression doesn't seem to help because the single output is already too big before it even gets added to the history.

Is there a way to limit or handle large outputs from code_execution_tool? Any guidance would be appreciated!

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions