Skip to content

feat(agent): exclude Code from the "PostHog resources used" bar#2546

Merged
k11kirky merged 1 commit into
mainfrom
posthog-code/exclude-code-from-resources-used
Jun 9, 2026
Merged

feat(agent): exclude Code from the "PostHog resources used" bar#2546
k11kirky merged 1 commit into
mainfrom
posthog-code/exclude-code-from-resources-used

Conversation

@k11kirky

@k11kirky k11kirky commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Problem

The "PostHog resources used" bar above the composer surfaced a Code chip on essentially every task — it was added on any file read. Since a user driving PostHog Code is already, by definition, using Code, the chip carried no information, and its link to the posthog.com/code landing page left people confused about what it was telling them (per the Slack thread that prompted this).

Changes

Removes the code product from the resources-used display entirely:

  • Drops the onCodeFileRead PostToolUse hook and its plumbing through claude-agent.ts and session/options.ts.
  • Removes the code entry from POSTHOG_PRODUCTS and the corresponding icon / doc-URL entries in SessionResourcesBar.

Other PostHog product chips (Experiments, Feature flags, SQL, …) are unaffected.

How did you test this?

  • pnpm --filter agent typecheck and pnpm --filter code typecheck — clean.
  • pnpm --filter agent exec vitest run on hooks.test.ts and posthog-products.test.ts (91 tests) — pass.
  • pnpm --filter code exec vitest run on accumulateSessionResources.test.ts (3 tests) — pass.
  • Biome check on changed files — clean.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code from a Slack thread

The "Code" chip was added to the resources-used bar on every file read,
which means it showed up on essentially every task. Since the user is by
definition already using PostHog Code, the chip carried no information and
its link (posthog.com/code landing page) was confusing.

Removes the `code` product entirely: the onCodeFileRead PostToolUse hook
and its plumbing through claude-agent / options, the `code` entry in
POSTHOG_PRODUCTS, and the icon/doc-url entries in the renderer bar.

Generated-By: PostHog Code
Task-Id: 76097881-cedd-478b-bfa0-eb96cf4d9e11
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit fa19e75.

@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "feat(agent): exclude Code from the "Post..." | Re-trigger Greptile

@k11kirky k11kirky marked this pull request as ready for review June 9, 2026 11:50
@k11kirky k11kirky merged commit add02dc into main Jun 9, 2026
20 checks passed
@k11kirky k11kirky deleted the posthog-code/exclude-code-from-resources-used branch June 9, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants