fix: AI assistant loses deployment region context during setup workflow#156
Open
cristhianrivera wants to merge 1 commit into
Open
fix: AI assistant loses deployment region context during setup workflow#156cristhianrivera wants to merge 1 commit into
cristhianrivera wants to merge 1 commit into
Conversation
…loud All omnibus skill descriptions listed both US/EU host options but never instructed the AI to resolve which one to use — causing it to silently default to US Cloud even for EU users. Now the AI checks the projects-get MCP response for a `region` field first, and explicitly asks the user "Are you on PostHog US Cloud or EU Cloud?" when the region cannot be determined from existing configuration. Also adds the missing region/host guidance to integration/description.md, which previously had no host URL instructions at all. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What happened
While onboarding PostHog and configuring a self-managed analytics setup, I turned to the PostHog chat agent for help with the manual instrumentation steps. That's when I noticed the agent had no awareness of which cloud region I was on. It consistently defaulted to US Cloud during my setup flow, referencing
us.i.posthog.comendpoints even though my project lives on EU Cloud. The setup instructions it generated pointed at the wrong ingest host, which caused events to fail silently until I caught the discrepancy manually.Root cause
The skill descriptions for all six
instrument-*omnibus skills, and the baseintegrationskill, listed both US and EU host options — but gave the AI no instruction on how to determine which one applied. Without resolution logic, the agent had no way to surface the ambiguity.Fix
instrument-integration,instrument-product-analytics,instrument-error-tracking,instrument-feature-flags,instrument-llm-analytics,instrument-logs) now instruct the agent to check theprojects-getMCP response for aregionfield first. If that's unavailable, it must ask the user explicitly: "Are you on PostHog US Cloud or EU Cloud?" — and is explicitly forbidden from assuming US Cloud.integration/description.mdgains a new Region and host URL section; it previously had no host guidance at all.Testing
All 60 existing tests pass (
npm test).