Skip to content

Broken on the latest rex update? #42

Done

Description

@FionnD

After updating Rex to 0.1.0-preview.23 (API revision 19), Axel no longer detects that it's running inside Rex. axel now runs inline instead of opening the floating pane, and switching between sessions with Tab no longer works. Is anyone else seeing this?

Activity

  1. FionnD commented on Nov 25, 2026

    @FionnD
    Author

    Found the cause. Rex Server 0.1.0-preview.23 stopped exporting REX_SESSION in new terminals. From its changelog:

    REX_BLOCK replaces REX_SESSION. New terminals no longer set REX_SESSION. Commands run in a Rex terminal find their session from REX_BLOCK, and anywhere a session goes, including -s, you can pass a full block ID to mean the session that holds that block.

    A fresh pane now only gets REX_SERVER, REX_BLOCK and REX_BIN_DIR. rex::detect() in crates/rex/src/lib.rs requires REX_SESSION, so it returns None and the launcher runs inline (which is what axel doctor reports: "not detected (REX_SESSION unset)"). The session filter in crates/axel/src/cmd/reconcile.rs depends on it too, which is why Tab switching breaks.

    Suggested fix: when REX_SESSION is unset but REX_BLOCK is set, resolve the session from the block, e.g. via rex whoami --json (it returns session_id), or pass the block ID wherever a session is expected, since Rex now accepts that.

    Workaround in ~/.zshrc until then (confirmed new panes get REX_SESSION again):

    if [[ -n $REX_BLOCK && -z $REX_SESSION ]]; then
      export REX_SESSION=$(rex whoami --json 2>/dev/null | python3 -c 'import json,sys;print(json.load(sys.stdin)["session_id"])' 2>/dev/null)
    fi

    Caveat: if a pane is later moved to another session, the exported value goes stale.

  2. lgalabru commented on Nov 26, 2026

    @lgalabru
    Owner

    thanks @FionnD, haven't updated yet, will take a look

  3. jonleopard commented on Nov 26, 2026

    @jonleopard
    Contributor

    Had this happen as well after the recent Rex updates. Some upstream Rex changes caused some breakage. Submitting #4 for your consideration @lgalabru

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions