Skip to content

Browser does not open when launched via Claude Code skill (non-TTY environment) #154

@jinhwan0724

Description

@jinhwan0724

Description

When plannotator review is executed via a Claude Code skill (slash command /plannotator-review), the server starts and listens on a port correctly, but the browser does not automatically open.

Running the same command directly in the terminal works fine — the browser opens and navigates to the correct URL.

Steps to Reproduce

  1. Install plannotator as a Claude Code plugin
  2. Run /plannotator-review in Claude Code (which triggers the skill defined in plannotator-review.md)
  3. The server starts and listens on a port (confirmed via lsof)
  4. The browser never opens

Expected Behavior

The browser should open and navigate to the plannotator review UI, just like when running plannotator review directly in a terminal.

Actual Behavior

  • The server starts and listens on the port successfully
  • The browser does not open
  • Manually running open http://localhost:<port> works as a workaround

Root Cause Analysis

When Claude Code executes a skill command, it runs the process with:

  • stdin redirected from /dev/null (< /dev/null)
  • No TTY attached (non-interactive shell)

The actual shell invocation looks like:

/bin/zsh -c 'source ... && eval "plannotator review" < /dev/null'

It appears that plannotator's browser-opening logic is either:

  • Checking for a TTY and skipping open when none is detected, or
  • Failing silently when attempting to open the browser in this environment

Suggested Fix

Consider always attempting to open the browser regardless of TTY status, or provide a fallback that prints the URL to stdout so the calling agent can open it. For example:

Server running at http://localhost:51119

This would allow Claude Code (or any non-TTY caller) to detect the URL and open it.

Environment

  • macOS (Darwin 24.5.0, arm64)
  • plannotator v0.8.0
  • Claude Code CLI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions