Skip to content

Task tool fails with "undefined is not an object (evaluating 'Q.model')" when launching sub-agents #1419

Closed

Description

@Gen-2k

Issue: Task Tool Fails When Launching Sub-Agents

Description

When attempting to use the task tool to launch any sub-agent (e.g., code-reviewer), the tool consistently fails with the following error message:

{"task_response": {"content": "Tool execution aborted", "name": "task"}}

And the underlying error observed is:

undefined is not an object (evaluating 'Q.model')

Steps to Reproduce

  1. Attempt to call the default_api.task() function with any valid subagent_type and prompt.
    • Example:
      print(default_api.task(description="Review code", prompt="Review this script", subagent_type="code-reviewer"))

Expected Behavior

The task tool should successfully launch the specified sub-agent without internal errors.

Actual Behavior

The task tool aborts execution, and an "undefined is not an object (evaluating 'Q.model')" error occurs internally, preventing the sub-agent from running.

Impact

This issue prevents the use of any sub-agent functionality, limiting the capabilities of the model for complex tasks that rely on these specialized agents.

Activity

  1. michabbb commented on Jul 30, 2025

    @michabbb
  2. self-assigned this
    on Aug 4, 2025
  3. thdxr commented on Aug 4, 2025

    @thdxr
    Member

    what model?

  4. michabbb commented on Aug 4, 2025

    @michabbb

    what model?

    for example: #1307 (comment)
    (claude opus)

  5. rekram1-node commented on Aug 6, 2025

    @rekram1-node
    Collaborator

    Possibly related:
    #1641

  6. Gen-2k commented on Aug 7, 2025

    @Gen-2k
    Author

    Gemini models Pro and Flash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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