Fix nx attach by setting SCREENDIR environment variable - #146
Merged
Conversation
The server creates screen sessions in /tmp/nexus-screen/ but the client attach command was looking in the default screen directory. Added SCREENDIR=/tmp/nexus-screen to both remote and local attach commands to match where the server creates sessions. Fixes the 'There is no screen to be resumed' error when attaching to jobs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Nov 24, 2025
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.
Summary
Fixes
nx attachcommand which was unable to find screen sessions after PR #145 was merged.Root Cause
The server creates screen sessions in
/tmp/nexus-screen/(seesrc/nexus/server/core/job.py:236-241), but the client attach commands weren't setting theSCREENDIRenvironment variable. This caused screen to look in the default directory instead of the custom location.Changes
env SCREENDIR=/tmp/nexus-screento remote SSH attach commandenv SCREENDIR=/tmp/nexus-screento local sudo attach commandTest Plan
nx attach <job_id>works on local targetnx attach <job_id>works on remote target/tmp/nexus-screen/🤖 Generated with Claude Code