Skip to content

Bug: Plan mode allows creating GitHub issues via gh CLI #34390

Closed as duplicate

Description

@sporteka2

Description

While in Plan Mode (read-only), it is possible to create GitHub issues using gh issue create and make API calls via gh api/curl. This violates the constraint that Plan Mode should be read-only.

Steps to Reproduce

  1. Be in Plan Mode
  2. Run any of:
    • gh issue create -R <repo> --title "test" --body "test"
    • curl -X PATCH -H "Authorization: ..." "https://api.github.com/repos/user/repo/issues/1"
    • gh issue comment <id> -R <repo> --body "..."
  3. The actions succeed — no read-only enforcement

Expected Behavior

Plan Mode should reject write operations — at minimum, Git/API pushes and issue/PR creation.

Actual Behavior

All operations complete successfully. The only restriction is a user-facing message that reads "I am in Plan Mode" but no actual enforcement.

Environment

  • Linux Mint 22.3 (Zena)
  • GitHub CLI 2.x
  • opencode: latest (from git)

Activity

  1. github-actions commented on Jun 29, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is specifically about gh CLI / remote API calls (not local file writes), #34190 is the closest match.

  2. TonyGarces commented on Aug 13, 2026

    @TonyGarces

    Addressed in the ranex fork (plan-mode-bash-guard, commit de1e2e5618) — see comment on #34190: Plan mode now denies/ prompts on mutating gh/git/curl commands and built-in GitHub writes. Closes the gh issue create/gh api bypass.

  3. neriousy commented on Oct 1, 2026

    @neriousy
    Member

    Closing as a duplicate of #34190, which tracks Plan mode letting the agent run mutating gh commands (comments, issues, API calls). Please follow and 👍 there.

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