To allocate resources:

tmux
salloc --cpus-per-task=2 --mem-per-cpu=4G --time=08:00:00
srun --pty bash

Change the number of cpus, memory, and adjust the time as needed.

Alternatively,

salloc --no-shell --cpus-per-task=2 --mem-per-cpu=4G --time=08:00:00

The --no-shell command decouples the allocation from any shell and more robust as you can attach/detach as needed as long as the resource is still allocated.

Then, run tmux, which creates a persistent session on the login node (login node stays on except for maintenance reasons). Then, allocate resources and access the node:

tmux
srun --jobid xxx --cpus-per-task=2 --mem-per-cpu=4G --pty bash

Note the job id or you can retrieve by squeue -u $USER (or if $USER is not set, type in your user ID).

With the job running, detach from the tmux session ctrl+b. And later re-attach with

tmux ls
tmux attach -t <name>

CIRC instructs not to run AI on the login node and they recommend to follow the above to allocate resources and then run your AI for a coding session.