Repository navigation
Restore relay analytics, add /start/ with ad-specific pages, stop app sessions forking old conversations - #285
Merged
Merged
Conversation
Relay PostHog events (downloads, installs, sessions, viewers, MCP results) stopped at 2026-09-23 17:11 UTC, four minutes after the 0.23.1 release, and have not come back through 0.23.3. The capture code is unchanged since the last good release; the relay only sends when vars.POSTHOG_ENABLED is "1", and Wrangler replaces every Worker var on deploy. The production config used since 0.23.1 leaves the flag out, so relay analytics turned off silently while the accounts app, whose flag is committed, kept reporting. The production guard now requires POSTHOG_ENABLED to be "0" or "1", as it already does for MCP_CONTROL_ENABLED, so the choice is always written down. The example config sets it to "0" so self-hosters see the flag. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScihqCEjAhjFfkvfSR3ZXN
Paid X traffic is almost all phones, and on the home page it bounces in
about a second. /start/ is a shorter page to test against it: one line on
what shell does, then install, start your agent, and scan the QR code. On a
phone, "Send these steps to my laptop" opens the share sheet.
The page gets exactly what "/" gets: the same Content-Security-Policy,
Google Analytics, first-party events and X base pixel (attributed to
/start/). It reports as its own route ("start" in PostHog, "landing_start"
on the statistics dashboard) so the two pages can be compared, and it is
noindex so the home page stays the one search engines show.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ScihqCEjAhjFfkvfSR3ZXN
Any shell command starts the daemon when none is running, and startDetachedDaemon gave it os.Environ(). Run from inside Claude Code, that carried CLAUDE_CODE_CHILD_SESSION and CLAUDE_CODE_SESSION_ID into the daemon, and from there into every session the browser asked for. prepareCommandLaunch saw a bare `claude` inside a Claude conversation and rewrote it to `claude --resume <id> --fork-session`, so starting Claude from the app reopened the conversation the daemon happened to be born in, every time, until the daemon restarted. OpenCode had the same path, including its "continue the latest session" fallback. Three independent guards, so one regression cannot bring it back: - The daemon starts without any agent harness's identity variables. - Sessions the daemon launches for the browser start without them too, which also covers a daemon an older release already started with them. - A session the browser asked for (SHELL_ONLINE_SESSION_ORIGIN set) never hands off. Typing `shell claude` inside Claude Code still does. harnessIdentityVariables is the one list; a test checks it covers every adapter's detection and strip variables. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScihqCEjAhjFfkvfSR3ZXN
- app: the live-browser canary deleted its temp directory while Chrome was still writing its profile into it on exit, and threw ENOTEMPTY after every check had passed (6 of the last 40 CI runs). rmSync now retries, which is what maxRetries exists for. - windows: the installer test gave `python -m http.server` ten seconds to answer; on a cold hosted runner it sometimes did not (3 of the last 40 runs, including main at 7ef9cd4). It now waits up to a minute and says so if the server process exits instead. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScihqCEjAhjFfkvfSR3ZXN
This was referenced Sep 29, 2026
The self-hosted image copies each source directory it builds from, and vite.config.ts now has start/index.html as an entry. Without the copy, `npm run build:standalone` fails with "Cannot resolve entry module start/index.html" and the container check goes red. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScihqCEjAhjFfkvfSR3ZXN
"passes the host's grid on once per change" sent a new grid and asserted after a fixed 40 ms. On a busy CI runner the relay's message had not arrived yet: the viewer's last size was still 173x51, not 90x30 (web job, run 36619589961). It now waits up to two seconds for the expected size, then settles, so the exactly-once and never-resize assertions still hold. 10/10 local runs pass with every core busy. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScihqCEjAhjFfkvfSR3ZXN
Contributor
Author
|
@TeoSlayer could you take a look at this one when you get a chance? We need it to start the paid X ads. They'll point at the new All 15 checks are green. To deploy it,
The deploy guard refuses the config until both are in. Thanks! |
An ad links to /start/?utm_content=<page>. The page asks PostHog's /flags
endpoint for the payload of the start-landing-pages flag and takes that
page's headline, subline, step 2 agent and button text from it, so a new
page or a wording change is an edit in PostHog, not a deploy.
- The request uses the public project token and a throwaway id, never the
visitor's analytics id or cookies, and gives up after 800 ms.
- Only a short page key (/^[a-z0-9][a-z0-9_-]{0,31}$/) is read from the
URL, and every payload field is validated and set as text, never markup.
An unknown page, a bad payload, or PostHog being slow or blocked shows the
default page.
- Replaceable text stays hidden until the page is decided (at most ~0.8 s),
with a CSS fallback that reveals it after 1.2 s even if the script never
runs.
- The page is decided before the page view is sent, and every event from the
visit carries landing_variant: the page key, or "default". The posthog
payload allowlist accepts only that key format, not raw campaign text.
- "Send to my laptop" keeps the page key, so the laptop shows the same page.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ScihqCEjAhjFfkvfSR3ZXN
# Conflicts: # CHANGELOG.md # cmd/shell/agent_loop.go # standalone/server.test.ts # vite.config.ts # wrangler.example.jsonc
# Conflicts: # CHANGELOG.md
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.
This combines #282, #283 and #284 into one PR, and fixes the two flaky CI checks that were failing them. Each change is its own commit, so the history stays readable.
What changes for the user?
vars.POSTHOG_ENABLED === "1", and Wrangler replaces every var on deploy.npm run deploy:productionnow refuses a config without an explicit"0"or"1"./start/for paid traffic/with paid X traffic: what shell does in one line, then install, start your agent, scan the QR code, plus "Send these steps to my laptop" (share sheet). It gets exactly/'s CSP, Google Analytics, first-party events and X pixel via oneisLandingPath()check. It reports as its own route (start/landing_start) and isnoindex.shellcommand starts the daemon withos.Environ(). Run inside Claude Code, that carried the conversation's id into the daemon and every browser-started session, so startingclaudefrom the app ranclaude --resume <old id> --fork-session. Fixed with three guards: the daemon's environment, browser-started sessions' environment, andhandoffAllowed()(browser starts never hand off). Typedshell claudeinside Claude Code still forks, as intended.ENOTEMPTYafter every check had passed (6 of the last 40 runs);rmSyncnow retries. windows: the installer test gavepython -m http.server10 s to answer on a cold runner (3 of the last 40 runs, includingmainat 7ef9cd4); it now waits 60 s and reports if the server process exits./start/?utm_content=<page>, and the page takes that page's headline, subline, step 2 agent and button text from the payload of thestart-landing-pagesfeature flag (via/flags?v=2, public token, a throwaway id, 800 ms timeout). New pages or wording changes are PostHog edits, not deploys. Only a short page key is read from the URL, fields are validated and set as text, and anything unknown, slow or blocked shows the default page. Events carrylanding_variant(the page key ordefault).Verification
npm run typecheckpasses.npm test: 67 files, 778 tests passed, plus the installer, Docker entrypoint, deploy guard, landing SEO and mobile checks.go vet ./...andgofmtare clean.go test -race -count=1 ./...passes: all 9 packages./start/: fits one screen at 390×664 and at 1440×900.HOMEend-to-end install → session → phone scan.appjob (it needs Postgres; the only change in its scope is the canary's cleanup line), the Windows job, and the QEMU jobs. CI covers them.Access and privacy
No change to authorization, terminal input, encryption or stored content.
/start/loads only what/loads, under the same opt-out and GPC/DNT checks. The daemon and browser-started sessions now inherit less: no agent conversation identity.Unreleasedsection has one Added and two Fixed entries.Rollout
wrangler.production.jsonc, add"POSTHOG_ENABLED": "1"tovarsand"/start/*"toassets.run_worker_first. The deploy guard refuses the config until both are there.shell service install, a restart, or signing in again).Supersedes #282, #283 and #284.
🤖 Generated with Claude Code
https://claude.ai/code/session_01ScihqCEjAhjFfkvfSR3ZXN