Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(devex): disable the broken typescript lsp plugin for claude code (#103618)

Julian Bez1fd1ae945b97
diff --git a/.claude/settings.json b/.claude/settings.json
index cdf3eff8c56a..25300ab48c13 100644
--- a/.claude/settings.json
+++ b/.claude/settings.json
@@ -20,6 +20,6 @@
]
},
"enabledPlugins": {
- "typescript-lsp@claude-plugins-official": true
+ "typescript-lsp@claude-plugins-official": false
}
}
diff --git a/.github/scripts/check-claude-settings.sh b/.github/scripts/check-claude-settings.sh
new file mode 100755
index 000000000000..f9de2d742dfa
--- /dev/null
+++ b/.github/scripts/check-claude-settings.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+# .claude/settings.json is shared by everyone, so only repo-wide keys may live in it.
+# Personal keys (permissions, env, model...) belong in .claude/settings.local.json
+# (gitignored). Checked against the git index so the staged version is what counts.
+set -euo pipefail
+
+SHARED_KEYS='["$schema", "hooks", "enabledPlugins"]'
+
+personal=$(git show :.claude/settings.json | node -e '
+ const shared = JSON.parse(process.argv[1])
+ const settings = JSON.parse(require("fs").readFileSync(0, "utf8"))
+ console.log(Object.keys(settings).filter((key) => !shared.includes(key)).join(", "))
+' "$SHARED_KEYS")
+
+if [ -z "$personal" ]; then
+ exit 0
+fi
+
+printf '\n\033[31m.claude/settings.json only holds repo-wide keys (%s).\nMove %s to .claude/settings.local.json (gitignored), or add the key to SHARED_KEYS in %s if everyone needs it.\033[0m\n\n' \
+ "$SHARED_KEYS" "$personal" "$0" >&2
+exit 1
diff --git a/AGENTS.md b/AGENTS.md
index 2ea8decbfcc1..267c5d9a0b13 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -30,7 +30,6 @@
- Start dev: `./bin/start` or `hogli start` (interactive TUI). Detached mode: `hogli up -d` paired with `hogli wait` / `hogli down`
- In a PostHog Tasks cloud run (`POSTHOG_TASK_RUN_ID` set), the boot sequence, prewarmed test database and scoped-test rules differ — read [Cloud task sandbox](docs/internal/cloud-task-sandbox.md) before starting the stack or running tests there
- OpenAPI/types: `hogli build:openapi` (regenerate after changing serializers/viewsets)
-- LSP: Pyright is configured against the flox venv. Prefer LSP (`goToDefinition`, `findReferences`, `hover`) over grep when navigating or refactoring Python code.
- Dev experience feedback: `hogli devex:feedback "<message>"` sends feedback about repo tooling — hogli, the dev stack, tests, CI, migrations, this setup — straight to the devex team as a `hogli_feedback` event (add `-c bug|idea|praise|question`).
**Local agents must use it too**: when a hogli command or local dev workflow is broken, slow, or confusing, run it — e.g. `hogli devex:feedback -c bug "migrations:run failed with <error>"`. Do not run it from cloud tasks or agent-server sandboxes; the command is a no-op there.
@@ -263,7 +262,7 @@ When automating a convention, try these in order — only fall back to the next
4. **AGENTS.md / CLAUDE.md instructions** — when automated enforcement isn't suitable
Claude Code hooks are reserved for environment bootstrapping (`SessionStart` only) — do not add `PreToolUse`, `PostToolUse`, or `Notification` hooks as they add latency and are fragile.
-Changes to `.claude/hooks/` trigger a warning from the `pre-commit` hook; changes to `.claude/settings.json` are blocked outright by lint-staged.
+Changes to `.claude/hooks/` trigger a warning from the `pre-commit` hook; lint-staged allows only repo-wide keys in `.claude/settings.json`, because personal settings belong in the gitignored `.claude/settings.local.json`.
A warn-only check belongs in the `pre-commit` hook body rather than in a lint-staged task, because lint-staged discards the output of every task that exits 0.
### Mandatory skill invocation
diff --git a/package.json b/package.json
index 1e0bc1403338..6c79d3c7b71e 100644
--- a/package.json
+++ b/package.json
@@ -84,7 +84,7 @@
"fsevents": "^2.3.3"
},
"lint-staged": {
- ".claude/settings.json": "sh -c 'printf \"\\n\\033[31mDo not commit .claude/settings.json — personal permissions belong in .claude/settings.local.json (gitignored).\\nUnstage with: git restore --staged .claude/settings.json\\033[0m\\n\\n\" >&2 && exit 1'",
+ ".claude/settings.json": "sh -c '.github/scripts/check-claude-settings.sh'",
"**/{AGENTS,CLAUDE}.md": "sh -c '.github/scripts/check-agents-md-symlinks.sh'",
"frontend/public/services/*.{png,jpg,jpeg,gif}": "node frontend/bin/check-service-icon-size.mjs",
"products/**/manifest.tsx": [