feat(settings): add rtk compression toggle, on by default#3257
Merged
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
There was a problem hiding this comment.
Gates denied this PR because it touches auth-adapter files (POSTHOG_RTK env var injection in auth-adapter.ts), which fall under the deny-list. Additionally, this is classified as a T2-never PR with zero reviews. Get a review from a team member before re-requesting auto-approval.
Contributor
|
Reviews (1): Last reviewed commit: "feat(settings): split rtk toggle into lo..." | Re-trigger Greptile |
3a1851d to
6658ce9
Compare
jonathanlab
approved these changes
Jul 9, 2026
6658ce9 to
69e4a90
Compare
Two checkboxes in one settings row, both default on: Local (covers local and worktree sessions) and Cloud. Opting out sends POSTHOG_RTK=0 to local sessions via configureProcessEnv, which owns every per-session process env write, and rtk_enabled: false into cloud run creation and resume. Only false is ever sent so the enabled default stays a server-side decision. When Local is enabled but no rtk binary is installed, the row shows a binary-required hint backed by a new agent.rtkStatus query and detectRtkBinary, which reports installation independent of the toggle state a prior session left in the environment.
69e4a90 to
2d90dcc
Compare
Gilbert09
added a commit
that referenced
this pull request
Jul 10, 2026
Adds a "Compress command output" cloud setting to the mobile app, on by default. When enabled, eligible shell command output on cloud runs is routed through rtk so verbose output is compressed before it reaches the model, reducing token usage. Only the Cloud half of #3257 is ported: mobile has no local agent sessions, no workspace-server, and no rtk binary, so the desktop Local checkbox, the agent.rtkStatus query, and the "rtk binary not found" warning have no mobile equivalent. The preference persists as rtkEnabledCloud (default true) and threads into every cloud-run start/resume path. Following the server default (enabled), only an explicit opt-out sends rtk_enabled: false; the enabled case sends nothing. Generated-By: PostHog Code Task-Id: eeb20b54-b0ff-4624-b0df-64ce78edbe50
2 tasks
Gilbert09
added a commit
that referenced
this pull request
Jul 10, 2026
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.
Problem
rtk command-output compression is rolling out on by default: the runtime auto-detects the binary on PATH (#3096), and cloud sandboxes ship it in the image with
POSTHOG_RTKset from the run's state (PostHog/posthog#69176). What's missing is the user-facing opt-out, one place in PostHog Code settings that turns it off across local, worktree, and cloud runs.Changes
add a "Compress command output" setting under Advanced, enabled by default. The preference is persisted and available across desktop, web, and mobile.
apply the setting to local and worktree sessions by passing it through session creation and reconnect, setting
POSTHOG_RTK=0when disabled and restoring automatic detection when enabled.apply the setting to cloud runs by sending
rtk_enabled: falseonly when users opt out. When enabled, no value is sent so the server-side default continues to control rollout.