Skip to content

fix(probe): let T3 Code's Claude chats join Relay on Linux - #2046

Merged
khaliqgant merged 2 commits into
mainfrom
fix/t3-code-linux
Nov 1, 2026
Merged

khaliqgant merged 2 commits into
mainfrom
fix/t3-code-linux

Conversation

@khaliqgant

@khaliqgant khaliqgant commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Stacked on #2041. On Linux, T3 Code's Claude chats still looked like automation to the core, so they never joined the roster. Fixes #2045 for Linux; Windows is not covered.

is_t3_app now also matches T3 Code's Linux main executable:

  • .deb: /opt/T3 Code (<Channel>)/t3code. The stable and preview builds install as T3 Code (Beta), nightly as T3 Code (Nightly). Channel names use the same rule as the macOS bundles.
  • AppImage: $TMPDIR/.mount_<random>/t3code, where the running AppImage mounts itself (/tmp by default).

T3's backend server runs from the same executable (ELECTRON_RUN_AS_NODE) and starts each Claude chat, so the walk matches at the chat's parent. The other guards from #2041 are unchanged: same UID, kind: interactive, stream-json input, no terminal, no -p/--print, and the walk stops at an intermediate or unreadable Claude session. The existing chat and claude -p tests now run against the macOS, .deb and AppImage executables. There is a new test for a parent owned by another user, and the path test has Linux cases that should be rejected: helpers, /usr/bin/t3code, ~/.local/bin/t3code, a non-/opt install, an extracted squashfs-root and an empty mount id.

Evidence (linuyc, Arch, x86_64; T3 Code 0.1.6 AppImage, Claude Code 2.1.280):

  • Ran live: the stable AppImage, checked against latest-linux.yml, on Hyprland in a hidden special workspace (--ozone-platform=headless segfaults in Electron). A real Claude chat sent from the UI ran with this ancestry, read from /proc:
    claude --output-format stream-json --verbose --input-format stream-json … (no -p)   tty_nr=0, fd0=socket
      └ /tmp/.mount_T3-CodmajGcH/t3code --require …/compileCache.cjs …/apps/server/dist/bin.mjs   (backend server)
        └ /tmp/.mount_T3-CodmajGcH/t3code --user-data-dir=…   (main)
          └ Hyprland
    
    Registry record: kind: interactive, entrypoint: sdk-ts. A temporary test that was not committed ran is_t3_chat with the real SystemProcesses on that pid. The result was true, and false with kind: sdk.
  • Taken from the packages, not run: the .deb path. The stable, preview and nightly .deb files all checked out against their release manifests. Their postinst and .desktop files point to /opt/T3 Code (Beta)/t3code (stable and preview) or /opt/T3 Code (Nightly)/t3code. The nightly AppImage also contains t3code and runs through the same AppImage runtime, but I didn't run it.

Not covered:

  • The Nix package (t3code-desktop): Electron there runs from the Nix store, so it won't match.
  • T3's web/CLI server (t3): it runs under node, so it can't be told apart from an SDK run.
  • Matching an AppImage mount by name is no stronger than macOS's ~/Applications check. The process guards are what keep automation out.

Tests: relay::claude 170 passed, relay::local 91 passed (1 ignored), cargo fmt --check is clean, and clippy reports nothing in the touched files. Clippy --all-targets stops on an existing non_octal_unix_permissions error in opencode_existing/native_tests.rs, which this PR doesn't touch. PROBE_VERSION is not bumped.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff


Agent Relay sessions

  • claude session ed0bac14 · opened via gh pr create · last active 2026-10-31

On Linux, T3 Code runs as `/opt/T3 Code (<Channel>)/t3code` from the .deb,
or as `$TMPDIR/.mount_<random>/t3code` from a running AppImage. Its backend
server is the same executable and starts each Claude chat, so `is_t3_app`
now matches those paths alongside the macOS bundles. Every other guard is
unchanged and now tested for each build: same UID, kind interactive,
stream-json input, no tty, no -p/--print, and the walk stops at an
intermediate or unreadable Claude session.

Refs #2045

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 90042c1f-442f-4748-a570-1a84e419afce
Commits

Reviewing files that changed from the base of the PR and between d9c6c68 and 84ca500.

Files selected for processing: 1
  • CHANGELOG.md
Files skipped from review as they are similar to previous changes: 1
  • CHANGELOG.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

T3 Code Claude chat detection now recognizes Linux package and mounted AppImage executables, alongside macOS bundles. Tests cover chat classification across representative builds and process-tree cases.

Changes: T3 Code chat detection

Layer / File(s) Summary
Executable-path recognition
crates/probe/src/relay/claude/app.rs
The detector accepts recognized Linux /opt package paths and executables inside nonempty .mount_* directories. Product validation accepts T3 Code and nonempty alphanumeric channel names.
Process classification and coverage
crates/probe/src/relay/claude/app.rs, CHANGELOG.md
Tests cover chat and nested-session classification, process ownership, and automation exclusions across representative builds. The changelog specifies automatic joining on macOS and Linux for .deb and AppImage installs.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related issues

  • AgentWorkforce/relay#2047 — The change adds Linux executable recognition for T3 Code Claude chats, matching the issue’s described behavior.
  • AgentWorkforce/relay#2045 — The change addresses Linux paths in the issue, but does not cover Windows.

Possibly related PRs

  • AgentWorkforce/relay#2041 — Both changes extend T3 Code Claude chat detection in crates/probe/src/relay/claude/app.rs; this change adds Linux executable matching to the prior macOS recognition.
Merge Risk: Minimal · up to 84ca5

The reviewed Linux install formats are covered by the detector and its tests. No actionable merge risk remains beyond normal checks.

Pre-merge checks: Passed 2 · Failed 3

Failed Failed checks: 3 warnings

Check name Status Explanation Resolution
Description check Warning The description provides substantial context and test results, but it does not follow the required template. It lacks the required RelayFlow Proof fields, including the change type and RelayFlow case,… Add the required template sections. Set Change type to feature or bugfix, add exactly one RelayFlow case under tests/relayflows/cases//, and include the corresponding RelayFlow case value. Organize the existing change summary and t…
Linked Issues check Warning Issue #2045 requires T3 Code Claude-session identification for Linux and Windows. This PR implements Linux .deb and AppImage paths in is_t3_app and adds Linux process-ancestry tests. The diff cont… Implement and test Windows T3 Code executable-path and process-ancestry matching, or remove the Windows requirement from the directly linked scope before merge.
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 2 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: enabling T3 Code Claude chats to join Relay on Linux.
Out of Scope Changes check Passed The changed is_t3_app logic, Linux rejection cases, shared macOS/Linux chat tests, and changelog entry support the Linux portion of issue #2045. The test refactoring exercises the shared guards. No …
Full details: Out of Scope Changes check

Explanation

The changed is_t3_app logic, Linux rejection cases, shared macOS/Linux chat tests, and changelog entry support the Linux portion of issue #2045. The test refactoring exercises the shared guards. No unrelated change is shown.

Full details: Description check

Explanation

The description provides substantial context and test results, but it does not follow the required template. It lacks the required RelayFlow Proof fields, including the change type and RelayFlow case, and it does not use the required Summary and Test Plan sections.

Resolution

Add the required template sections. Set Change type to feature or bugfix, add exactly one RelayFlow case under tests/relayflows/cases/<case-id>/, and include the corresponding RelayFlow case value. Organize the existing change summary and test results under Summary and Test Plan.

Full details: Linked Issues check

Explanation

Issue #2045 requires T3 Code Claude-session identification for Linux and Windows. This PR implements Linux .deb and AppImage paths in is_t3_app and adds Linux process-ancestry tests. The diff contains no Windows executable-path or process-ancestry implementation or tests. The issue remains open, and the PR description confirms that Windows is not covered.

Resolution

Implement and test Windows T3 Code executable-path and process-ancestry matching, or remove the Windows requirement from the directly linked scope before merge.

Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 6 functions across 1 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the paths at night,
Linux builds now join the light.
Stable, Beta, Nightly pass,
AppImages emerge from glass.
Mac bundles keep their place,
Tests hop through each process trace.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T15:35:02.928860Z d9c6c68 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@greptile-apps

greptile-apps Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable new issues were found.

Summary

Adds Linux recognition for T3 Code’s Claude chats.

  • T3 Code chats on Linux now join the Relay roster.

khaliqgant explicitly accepts name-based AppImage recognition. Nix installs, the web/CLI server, and Windows remain outside the stated scope.

Reviews (2) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

@kjgbot
kjgbot changed the base branch from fix/t3-code-chat-joins to main October 31, 2026 17:23
@khaliqgant
khaliqgant merged commit 7d01906 into main Nov 1, 2026
92 of 93 checks passed
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.

T3 Code: Linux and Windows Claude sessions don't join Relay

1 participant