Skip to content

Server tests fail in agent shells that inherit T3_SERVICE_LAUNCHER_CONTEXT #703

Closed

Description

@Jacksondr5

Problem

An agent running tests from a shell inside J5 Code inherits T3_SERVICE_LAUNCHER_CONTEXT from the live server, which runs under the service launcher. Vitest's forked workers have an IPC channel, so resolveStartup reads that context. Two tests in apps/server/src/environment/ServerEnvironment.test.ts then fail with "The service launcher started a different t3 version". They pass with env -u T3_SERVICE_LAUNCHER_CONTEXT.

Found during the 2026-10-24 upstream advance; neither test changed in that merge.

To decide

Either:

  • add the variable to AGENTS.md rule 3's env -u … list (it already unsets T3CODE_PORT, T3CODE_HOST and J5CODE_HOME); or
  • make the test ignore an inherited context. That edits an upstream test, and could be offered upstream, since an agent in a T3 Code terminal hits the same failure.

Activity

  1. Jacksondr5 commented on Oct 27, 2026

    @Jacksondr5
    OwnerAuthor

    Fixed by the upstream v0.1.3 advance (#705): upstream's new apps/server/src/testUtils/managedServiceEnv.setup.ts clears the inherited launcher context before server tests run (J5 also clears J5CODE_HOME there). Checked 2026-10-27 at 2f6b127a88 from an agent shell that inherits T3_SERVICE_LAUNCHER_CONTEXT: ServerEnvironment.test.ts passes 6/6. Closing when #705 merges.

    Claude Opus 5.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions