Handle tasks that may exceed tool timeouts (model training, large builds, data processing).
task.log, build.log) should be saved in artifacts/ when possible.artifacts/ for easy retrieval.For any task that might exceed the Bash tool timeout (10 minutes):
# Use nohup to persist after session ends, redirect all output to log
nohup <command> > task.log 2>&1 &
echo "Task started with PID $!"
# Check by process name
pgrep -f "<command_pattern>" && echo "Still running" || echo "Completed"
# Or check the log for completion indicators
tail -20 task.log
# Watch log file for updates
tail -f task.log # (use with timeout or Ctrl+C)
# Or get last N lines
tail -50 task.log
# Start quantization in background
nohup python quantize.py --model GLM-4.7-flash --format NVFP4 > quantize.log 2>&1 &
echo "Quantization started. Check quantize.log for progress."
Then periodically:
tail -30 quantize.log
pgrep -f "quantize.py" && echo "Still running..." || echo "Process completed!"
# Start build in background
nohup cargo build --release > build.log 2>&1 &
echo "Build started with PID $!"
Check progress:
tail -20 build.log
# Start pipeline
nohup ./process_data.sh input/ output/ > pipeline.log 2>&1 &
# Check progress (if script outputs progress)
grep -E "Progress|Completed|Error" pipeline.log | tail -10
nohup - Ensures task survives if connection drops> file.log 2>&1echo $! right after startingWhen starting a long task, tell the user:
When checking progress, report:
When task completes: