Skip to content

fix(hooks): warn at session start when VGV CLI is missing or outdated#55

Open
jorgecoca wants to merge 2 commits intomainfrom
fix/warn-missing-mcp
Open

fix(hooks): warn at session start when VGV CLI is missing or outdated#55
jorgecoca wants to merge 2 commits intomainfrom
fix/warn-missing-mcp

Conversation

@jorgecoca
Copy link
Contributor

Summary

  • Adds a SessionStart hook that checks VGV CLI version on session start and warns if missing or outdated
  • Reuses existing check_vgv_cli() from vgv-cli-common.sh — no duplicated logic
  • Non-blocking (always exits 0) so the session proceeds even if the CLI is unavailable

Closes #53

Test plan

  • Start a session without VGV CLI installed → verify warning is printed
  • Start a session with VGV CLI < 1.1.0 → verify upgrade warning is printed
  • Start a session with VGV CLI >= 1.1.0 → verify no warning

🤖 Generated with Claude Code

Closes #53

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jorgecoca jorgecoca requested a review from a team as a code owner March 21, 2026 01:05
@jorgecoca jorgecoca self-assigned this Mar 21, 2026
@jorgecoca jorgecoca requested a review from omartinma March 21, 2026 01:09
@jorgecoca jorgecoca added the bug Something isn't working label Mar 21, 2026
Copy link
Contributor

@PabloTortosaLopez PabloTortosaLopez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@RuiMiguel RuiMiguel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
For the record, SessionStart hook is designed to provide context to Claude, not to display messages in the terminal. Despite the script is working, it will never be shown to the user, even if we redirect it to the stderr or stdout. At least this is added to the context, so Claude would be warned.
Maybe this is something that could be added to the README

SessionStart hook output to stderr is not shown to the user or
injected into Claude's context. Switch to stdout so Claude receives
the warning and can proactively inform the user about missing or
outdated VGV CLI.
@jorgecoca
Copy link
Contributor Author

I think it is ok to just pass it to Claude's context, and let it decided.
@RuiMiguel I've updated the PR to message to stdout. Let me know what you think

Copy link
Contributor

@RuiMiguel RuiMiguel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: warn at session start when Very Good CLI version doesn't support MCP

3 participants