Skip to content

Bug: run_shell_command fails with 'Cannot read properties of undefined (reading \'publish\')' #21982

@sehoon38

Description

@sehoon38

What happened?

When Gemini CLI attempts to run git checkout or git branch commands via the run_shell_command tool, it fails with an internal tool error: Cannot read properties of undefined (reading 'publish'). This happens consistently for branch creation/switching commands.

What did you expect to happen?

The tool should execute the shell command (git checkout -b <branch> or similar) successfully and return the command output.

Client information

Client Information

macOS
gemini-cli-core 0.35.0-nightly

Login information

n/a

Anything else we need to know?

This error is blocking automated PR creation workflows since the agent cannot create or switch to new branches when trying to use the GitHub Issue/PR creator skills.

Metadata

Metadata

Assignees

No one assigned

    Labels

    aiq/agentIssues related to improving performance of our AI developer products and measurementarea/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualitystatus/need-triageIssues that need to be triaged by the triage automation.🔒 maintainer only⛔ Do not contribute. Internal roadmap item.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions