• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
Recached

supabase / cli / 25662741632

11 May 2026 09:46AM UTC coverage: 63.722% (-0.03%) from 63.747%
25662741632

push

github

web-flow
fix(cli): skip Claude Code plugin hint when stdout is non-TTY (#5212) (#5223)

### What kind of change does this PR introduce?

Bug fix (plus e2e regression coverage).

### What is the current behavior?

When `CLAUDECODE=1` (e.g. Claude Code / agent harness), the CLI can emit
a `<claude-code-hint … />` trailer intended for the Claude Code UI. That
is inappropriate when the user is capturing primary output (redirects,
pipes, or tools that merge streams), because it can end up in generated
files or other machine-readable output and break consumers such as
TypeScript parsing.

Tracked in [#5212](https://github.com/supabase/cli/issues/5212).

### What is the new behavior?

`SuggestClaudePlugin()` only returns the hint when running inside Claude
Code **and** standard output is a terminal (interactive). If stdout is
redirected or piped, the hint is not suggested, so it is not printed
after commands and captured output stays clean.

An e2e case exercises `gen types` with `CLAUDECODE=1` and asserts
neither captured stdout nor stderr contains `claude-code-hint`. The
`testBehaviour` `run` helper accepts optional `exec` options so tests
can set extra env vars without duplicating harness setup.

No user-facing visual changes.

### Additional context

- The regression test lives in `apps/cli-e2e` and reuses the existing
gen-types scenario (same test title → same fixture slug).
- Run the focused suite with  
`SUPABASE_GO_BINARY="$PWD/apps/cli-go/supabase-go" pnpm nx run
@supabase/cli-e2e:test:go -- src/tests/gen.e2e.test.ts`
  (and `test:legacy` if you want parity on the legacy harness).

## Testing method

Use RED/GREEN testing with the e2e test to ensure this properly fix an
existing regression.

---------

Co-authored-by: Claude <noreply@anthropic.com>

9991 of 15679 relevant lines covered (63.72%)

7.06 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.09
/internal/debug/postgres.go


Source Not Available

The file "internal/debug/postgres.go" isn't available on github. Either it's been removed, or the repo root directory needs to be updated.

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc